From e8b96218d2defbf50604d02b1a68395427089ce0 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 10 Feb 2020 18:12:47 +0100 Subject: [PATCH] dnsdist: Fix configuration file installation / chmod Introduced in c98c0ef694de0c536e6d71af8c58a16f6635ea35 --- .../debian/dnsdist/debian-buster/dnsdist.postinst | 6 +++--- builder-support/debian/dnsdist/debian-buster/rules | 1 + .../debian/dnsdist/debian-jessie/dnsdist.postinst | 6 +++--- builder-support/debian/dnsdist/debian-jessie/rules | 1 + .../debian/dnsdist/debian-stretch/dnsdist.postinst | 6 +++--- builder-support/debian/dnsdist/debian-stretch/rules | 1 + 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/builder-support/debian/dnsdist/debian-buster/dnsdist.postinst b/builder-support/debian/dnsdist/debian-buster/dnsdist.postinst index 7bbf10b16b..8f7a7ce181 100644 --- a/builder-support/debian/dnsdist/debian-buster/dnsdist.postinst +++ b/builder-support/debian/dnsdist/debian-buster/dnsdist.postinst @@ -19,10 +19,10 @@ case "$1" in 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 + if [ "`stat -c '%U:%G' /etc/dnsdist/dnsdist.conf`" = "root:root" ]; then + chown root:_dnsdist /etc/dnsdist/dnsdist.conf # Make sure that dnsdist can read it; the default used to be 0600 - chmod g+r /etc/powerdns/dnsdist.conf + chmod g+r /etc/dnsdist/dnsdist.conf fi ;; diff --git a/builder-support/debian/dnsdist/debian-buster/rules b/builder-support/debian/dnsdist/debian-buster/rules index 31d234e4ea..42533bfda0 100755 --- a/builder-support/debian/dnsdist/debian-buster/rules +++ b/builder-support/debian/dnsdist/debian-buster/rules @@ -78,4 +78,5 @@ override_dh_installinit: override_dh_fixperms: dh_fixperms # these files often contain passwords. 640 as it is chowned to root:_dnsdist + touch debian/dnsdist/etc/dnsdist/dnsdist.conf chmod 0640 debian/dnsdist/etc/dnsdist/dnsdist.conf diff --git a/builder-support/debian/dnsdist/debian-jessie/dnsdist.postinst b/builder-support/debian/dnsdist/debian-jessie/dnsdist.postinst index 7bbf10b16b..8f7a7ce181 100644 --- a/builder-support/debian/dnsdist/debian-jessie/dnsdist.postinst +++ b/builder-support/debian/dnsdist/debian-jessie/dnsdist.postinst @@ -19,10 +19,10 @@ case "$1" in 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 + if [ "`stat -c '%U:%G' /etc/dnsdist/dnsdist.conf`" = "root:root" ]; then + chown root:_dnsdist /etc/dnsdist/dnsdist.conf # Make sure that dnsdist can read it; the default used to be 0600 - chmod g+r /etc/powerdns/dnsdist.conf + chmod g+r /etc/dnsdist/dnsdist.conf fi ;; diff --git a/builder-support/debian/dnsdist/debian-jessie/rules b/builder-support/debian/dnsdist/debian-jessie/rules index 989562eb93..053c23e5cc 100755 --- a/builder-support/debian/dnsdist/debian-jessie/rules +++ b/builder-support/debian/dnsdist/debian-jessie/rules @@ -78,4 +78,5 @@ override_dh_installinit: override_dh_fixperms: dh_fixperms # these files often contain passwords. 640 as it is chowned to root:_dnsdist + touch debian/dnsdist/etc/dnsdist/dnsdist.conf chmod 0640 debian/dnsdist/etc/dnsdist/dnsdist.conf diff --git a/builder-support/debian/dnsdist/debian-stretch/dnsdist.postinst b/builder-support/debian/dnsdist/debian-stretch/dnsdist.postinst index 7bbf10b16b..8f7a7ce181 100644 --- a/builder-support/debian/dnsdist/debian-stretch/dnsdist.postinst +++ b/builder-support/debian/dnsdist/debian-stretch/dnsdist.postinst @@ -19,10 +19,10 @@ case "$1" in 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 + if [ "`stat -c '%U:%G' /etc/dnsdist/dnsdist.conf`" = "root:root" ]; then + chown root:_dnsdist /etc/dnsdist/dnsdist.conf # Make sure that dnsdist can read it; the default used to be 0600 - chmod g+r /etc/powerdns/dnsdist.conf + chmod g+r /etc/dnsdist/dnsdist.conf fi ;; diff --git a/builder-support/debian/dnsdist/debian-stretch/rules b/builder-support/debian/dnsdist/debian-stretch/rules index dafe4957e1..e058f0e252 100755 --- a/builder-support/debian/dnsdist/debian-stretch/rules +++ b/builder-support/debian/dnsdist/debian-stretch/rules @@ -77,4 +77,5 @@ override_dh_installinit: override_dh_fixperms: dh_fixperms # these files often contain passwords. 640 as it is chowned to root:_dnsdist + touch debian/dnsdist/etc/dnsdist/dnsdist.conf chmod 0640 debian/dnsdist/etc/dnsdist/dnsdist.conf -- 2.47.2