~racb/ubuntu/precise/cobbler/858860

« back to all changes in this revision

Viewing changes to debian/cobbler.preinst

  • Committer: Robie Basak
  • Date: 2012-01-05 09:13:20 UTC
  • mfrom: (66.1.2 precise)
  • Revision ID: robie.basak@canonical.com-20120105091320-wfj4oo5pt1vgnps2
debian/cobbler.preinst: fix /etc/cobbler/users.digest if upgrading from a
version that set it world readable (LP: #858860).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
set -e
 
3
 
 
4
# Fix world-readable permissions on /etc/cobbler/users.digest if upgrading
 
5
# from a version which had it set incorrectly by default, the file is still
 
6
# there and still has the original incorrect permissions (LP: #858860).
 
7
 
 
8
if [ "$1" = "upgrade" ] \
 
9
     && dpkg --compare-versions "$2" lt "2.2.2-0ubuntu14" \
 
10
     && [ -f /etc/cobbler/users.digest \
 
11
     -a `stat -c%a /etc/cobbler/users.digest` = "644" ]; then
 
12
        chmod 600 /etc/cobbler/users.digest
 
13
fi
 
14
 
 
15
#DEBHELPER#