summaryrefslogtreecommitdiffstats
path: root/debian/winbind.postinst
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:20:02 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:20:02 +0000
commit0a354ad0b2c9eaaa204c31db478da109dc6d2a8b (patch)
tree2467caa8ad20a7fca31bef64224e41a4238db0c9 /debian/winbind.postinst
parentAdding upstream version 2:4.20.0+dfsg. (diff)
downloadsamba-0a354ad0b2c9eaaa204c31db478da109dc6d2a8b.tar.xz
samba-0a354ad0b2c9eaaa204c31db478da109dc6d2a8b.zip
Adding debian version 2:4.20.0+dfsg-1~exp1.debian/2%4.20.0+dfsg-1_exp1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/winbind.postinst')
-rw-r--r--debian/winbind.postinst24
1 files changed, 24 insertions, 0 deletions
diff --git a/debian/winbind.postinst b/debian/winbind.postinst
new file mode 100644
index 0000000..9aadab3
--- /dev/null
+++ b/debian/winbind.postinst
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+set -e
+
+# in 4.17.4+dfsg-3 we stopped masking services, unmask them here
+if [ configure = "$1" ] && dpkg --compare-versions "$2" lt-nl 2:4.17.4+dfsg-3~
+then
+ for s in winbind; do
+ if [ /dev/null = $(realpath /etc/systemd/system/$s.service) ]
+ then
+ rm -f /etc/systemd/system/$s.service
+ fi
+ done
+fi
+
+if [ configure = "$1" -a ! "$2" ] # only do this if not upgrading
+then
+ # groupadd --force: ok if group already exist
+ groupadd --system --force winbindd_priv
+ dir=/var/lib/samba/winbindd_privileged
+ [ -d $dir ] || install -d -m 0750 -g winbindd_priv $dir
+fi
+
+#DEBHELPER#