~ubuntu-branches/ubuntu/vivid/prewikka/vivid

« back to all changes in this revision

Viewing changes to debian/prewikka.postinst

  • Committer: Bazaar Package Importer
  • Author(s): Nico Golde
  • Date: 2010-06-10 15:50:02 UTC
  • mfrom: (8.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100610155002-61mcf03fhfpm79l9
Tags: 1.0.0-1.1
* Non-maintainer upload by the Security Team.
* Install prewikka.conf file with mode 0640 to prevent disclosure
  of db credentials (CVE-2010-2058; Closes: #584469).
  NOTE to maintainer: I've seen there is a chmod 640 at the end
  of the postinst script but this is on the one hand prone to a
  race condition and on the other hand not always effective.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
    dbc_dbserver=localhost
47
47
  fi
48
48
 
49
 
  cp /usr/share/doc/prewikka/examples/prewikka.conf $CONF_NEW
 
49
  install -m 0640 /usr/share/doc/prewikka/examples/prewikka.conf $CONF_NEW
50
50
 
51
51
  # do the following only if user has choosen dbconfig to manage database
52
52
  if [ -n "$dbc_dbtype" ]; then
57
57
 
58
58
  if diff -q /usr/share/doc/prewikka/examples/prewikka.conf ${CONF} >/dev/null 2>&1; then
59
59
    # prewikka configure file has not been changed .. overwrite it
60
 
    cp $CONF_NEW $CONF
 
60
    install -m 0640 $CONF_NEW $CONF
61
61
  else
62
62
    do_update $CONF $CONF_NEW
63
63
  fi