[Pkg-samba-maint] [samba] 01/02: Fix 'winbindd privileged socket directory' (Closes: #754339)
Mathieu Parent
sathieu at moszumanska.debian.org
Thu Jan 26 22:02:45 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 4098723a19c02bbeb413fb32732ad68e2ec28419
Author: Mathieu Parent <math.parent at gmail.com>
Date: Thu Jan 26 22:53:09 2017 +0100
Fix 'winbindd privileged socket directory' (Closes: #754339)
- Fix path from /var/run/samba/winbindd_privileged/ to /var/lib/samba/winbindd_privileged/
- Move mkdir+chgrp+chmod to postinst (to handle systemd also)
NB: /var/run/samba/winbindd_privileged/ is no longer removed on purge, as /run is purged on reboot
Thanks to Jim Barber for the report.
---
debian/winbind.init | 3 ---
debian/winbind.postinst | 5 +++++
debian/winbind.postrm | 4 +++-
debian/winbind.upstart | 3 ---
4 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/debian/winbind.init b/debian/winbind.init
index 13905cb..505dcca 100644
--- a/debian/winbind.init
+++ b/debian/winbind.init
@@ -40,9 +40,6 @@ case "$1" in
fi
log_daemon_msg "Starting the Winbind daemon" "winbind"
- mkdir -p /var/run/samba/winbindd_privileged || return 1
- chgrp winbindd_priv $PIDDIR/winbindd_privileged/ || return 1
- chmod 0750 $PIDDIR/winbindd_privileged/ || return 1
start-stop-daemon --start --quiet --oknodo --exec $DAEMON -- $WINBINDD_OPTS
log_end_msg $?
diff --git a/debian/winbind.postinst b/debian/winbind.postinst
index a1d0006..dd671f4 100644
--- a/debian/winbind.postinst
+++ b/debian/winbind.postinst
@@ -5,4 +5,9 @@ set -e
getent group winbindd_priv >/dev/null 2>&1 ||
addgroup --system --force-badname --quiet winbindd_priv
+winbindd_privileged_socket_directory='/var/lib/samba/winbindd_privileged'
+mkdir -pv "$winbindd_privileged_socket_directory"
+chgrp -c winbindd_priv "$winbindd_privileged_socket_directory"
+chmod -c 0750 "$winbindd_privileged_socket_directory"
+
#DEBHELPER#
diff --git a/debian/winbind.postrm b/debian/winbind.postrm
index f12ea00..aca8b1a 100644
--- a/debian/winbind.postrm
+++ b/debian/winbind.postrm
@@ -2,9 +2,11 @@
set -e
if [ "$1" = purge ]; then
+ winbindd_privileged_socket_directory='/var/lib/samba/winbindd_privileged'
rm -rf /var/cache/samba/netsamlogon_cache.tdb /var/cache/samba/winbindd_cache.tdb
+ rm -rf "$winbindd_privileged_socket_directory"
rm -rf /var/log/samba/log.winbind* /var/log/samba/log.wb*
- rm -rf /var/run/samba/winbindd.pid /var/run/samba/winbindd_privileged/
+ rm -rf /var/run/samba/winbindd.pid
fi
#DEBHELPER#
diff --git a/debian/winbind.upstart b/debian/winbind.upstart
index 5ea6697..9129d23 100644
--- a/debian/winbind.upstart
+++ b/debian/winbind.upstart
@@ -8,9 +8,6 @@ respawn
pre-start script
test -x /usr/sbin/winbindd || exit 0
- mkdir -p /var/run/samba/winbindd_privileged
- chgrp winbindd_priv /var/run/samba/winbindd_privileged
- chmod 0750 /var/run/samba/winbindd_privileged
end script
script
--
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