[Pkg-samba-maint] [samba] 06/07: Ensure /var/log/samba permissions are set (Closes: #711138)

Mathieu Parent sathieu at moszumanska.debian.org
Wed Jul 19 06:06:15 UTC 2017


This is an automated email from the git hooks/post-receive script.

sathieu pushed a commit to branch master
in repository samba.

commit 6ee9ebaca4b96916f20ddf72c5cedcb64d2113e0
Author: Mathieu Parent <math.parent at gmail.com>
Date:   Tue Jul 18 23:18:29 2017 +0200

    Ensure /var/log/samba permissions are set (Closes: #711138)
---
 debian/rules                          |  3 ---
 debian/samba-common.lintian-overrides |  2 --
 debian/samba-common.postinst          | 12 ++++++++++--
 3 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/debian/rules b/debian/rules
index 3336bd6..e250dd8 100755
--- a/debian/rules
+++ b/debian/rules
@@ -242,9 +242,6 @@ override_dh_fixperms:
 	dh_fixperms
 ifneq (,$(filter samba-common, $(shell dh_listpackages)))
 	chmod a+x debian/samba-common/usr/share/samba/panic-action
-	# Set some reasonable default perms for the samba logdir.
-	chmod 0750 debian/samba-common/var/log/samba/
-	chown root:adm debian/samba-common/var/log/samba/
 endif
 ifneq (,$(filter samba, $(shell dh_listpackages)))
 	chmod 1777 debian/samba/var/spool/samba/
diff --git a/debian/samba-common.lintian-overrides b/debian/samba-common.lintian-overrides
deleted file mode 100644
index 679047e..0000000
--- a/debian/samba-common.lintian-overrides
+++ /dev/null
@@ -1,2 +0,0 @@
-# This is on purpose to hide sensitive information
-samba-common: non-standard-dir-perm var/log/samba/ 0750 != 0755
diff --git a/debian/samba-common.postinst b/debian/samba-common.postinst
index 56d7a64..53418be 100644
--- a/debian/samba-common.postinst
+++ b/debian/samba-common.postinst
@@ -17,8 +17,7 @@ configure_smb_conf() {
 	local CONFIG
 	CONFIG="$1"
 
-	# Is the user configuring with debconf, or he/she prefers
-	# swat/manual config?
+	# Is the user configuring with debconf, or he/she prefers manual config?
 	db_get samba-common/do_debconf || true
 	if [ "${RET}" != "true" ]; then
 		return 0
@@ -64,6 +63,15 @@ configure_smb_conf() {
 
 }
 
+if [ "$1" = configure ]; then
+    if ! dpkg-statoverride --list /var/log/samba >/dev/null; then
+        # Set some reasonable default perms for the samba logdir
+        # to hide sensitive information
+        chmod 0750 /var/log/samba
+        chown root:adm /var/log/samba
+    fi
+fi
+
 
 if [ -e "$CONFIG" ]; then
 	configure_smb_conf "$CONFIG"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git




More information about the Pkg-samba-maint mailing list