adduser --force-badname --system --home /nonexistent --group \
--no-create-home --quiet _dnsdist || true
+
+ if [ "`stat -c '%U:%G' /etc/powerdns/dnsdist.conf`" = "root:root" ]; then
+ chown root:_dnsdist /etc/powerdns/dnsdist.conf
+ # Make sure that dnsdist can read it; the default used to be 0600
+ chmod g+r /etc/powerdns/dnsdist.conf
+ fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
override_dh_installinit:
# do nothing here. avoids referencing a non-existant init script.
+override_dh_fixperms:
+ dh_fixperms
+ # these files often contain passwords. 640 as it is chowned to root:_dnsdist
+ chmod 0640 debian/pdns-server/etc/powerdns/dnsdist.conf
adduser --force-badname --system --home /nonexistent --group \
--no-create-home --quiet _dnsdist || true
+
+ if [ "`stat -c '%U:%G' /etc/powerdns/dnsdist.conf`" = "root:root" ]; then
+ chown root:_dnsdist /etc/powerdns/dnsdist.conf
+ # Make sure that dnsdist can read it; the default used to be 0600
+ chmod g+r /etc/powerdns/dnsdist.conf
+ fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
override_dh_installinit:
dh_installinit
dh_systemd_start -pdnsdist --restart-after-upgrade dnsdist.service
+
+override_dh_fixperms:
+ dh_fixperms
+ # these files often contain passwords. 640 as it is chowned to root:_dnsdist
+ chmod 0640 debian/pdns-server/etc/powerdns/dnsdist.conf
adduser --force-badname --system --home /nonexistent --group \
--no-create-home --quiet _dnsdist || true
+
+ if [ "`stat -c '%U:%G' /etc/powerdns/dnsdist.conf`" = "root:root" ]; then
+ chown root:_dnsdist /etc/powerdns/dnsdist.conf
+ # Make sure that dnsdist can read it; the default used to be 0600
+ chmod g+r /etc/powerdns/dnsdist.conf
+ fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
override_dh_installinit:
# do nothing here. avoids referencing a non-existant init script.
+override_dh_fixperms:
+ dh_fixperms
+ # these files often contain passwords. 640 as it is chowned to root:_dnsdist
+ chmod 0640 debian/pdns-server/etc/powerdns/dnsdist.conf