Commit 77e44293 authored by Didier Raboud's avatar Didier Raboud

Given upstream's new enforcement of ConfigFilePerm on /etc/cups/ppd/ files, make…

Given upstream's new enforcement of ConfigFilePerm on /etc/cups/ppd/ files, make sure this is enforced on upgrade
parent 4ed135e6
......@@ -15,6 +15,21 @@ if [ "$1" = configure ]; then
fi
done
# Enforce the ConfigFilePerm on ppd file if we upgrade to 2.1.x
if dpkg --compare-versions "$2" lt-nl "2.1.0-2~"; then
configfileperm=`egrep '^ConfigFilePerm ' /etc/cups/cupsd.conf | awk '{print $2}' | tail -n 1`
if [ -z "$configfileperm" ]; then
configfileperm=0640
fi
for i in /etc/cups/ppd/*
do
if [ -f $i ]; then
chown root:lp $i
chmod $configfileperm $i
fi
done
fi
# symlink snakeoil SSL certificate if present
if [ -e /etc/ssl/certs/ssl-cert-snakeoil.pem -a \
-e /etc/ssl/private/ssl-cert-snakeoil.key -a \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment