[packages/samba] - merged triggerpostun on samba4
qboosh
qboosh at pld-linux.org
Thu Mar 25 19:13:25 CET 2021
commit 9c584085edf966c926a00d8d82d13a787b61c080
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Thu Mar 25 19:14:43 2021 +0100
- merged triggerpostun on samba4
samba.spec | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
---
diff --git a/samba.spec b/samba.spec
index 6e21931..40c39d3 100644
--- a/samba.spec
+++ b/samba.spec
@@ -754,6 +754,19 @@ fi
%systemd_post smb.service nmb.service
%triggerpostun -- samba4
+### samba4 < 1:4.1.1-1
+# CVE-2013-4476
+if [ -e %{_sysconfdir}/samba/tls/key.pem ]; then
+ PERMS=$(stat -c %a %{_sysconfdir}/samba/tls/key.pem)
+ if [ "$PERMS" != "600" ]; then
+ chmod 600 %{_sysconfdir}/samba/tls/key.pem || :
+ echo "Fixed permissions of private key file %{_sysconfdir}/samba/tls/key.pem from $PERMS to 600"
+ echo "Consider regenerating TLS certificate"
+ echo "Removing all tls .pem files will cause an auto-regeneration with the correct permissions"
+ fi
+fi
+
+### any
/sbin/chkconfig --add samba
%service samba restart "Samba AD daemons"
%systemd_post samba.service
@@ -762,15 +775,6 @@ fi
%{_bindir}/net groupmap add sid=S-1-5-32-546 unixgroup=nobody type=builtin || :
%triggerpostun -- samba4 < 1:4.1.1-1
-# CVE-2013-4476
-[ -e %{_sysconfdir}/samba/tls/key.pem ] || exit 0
-PERMS=$(stat -c %a %{_sysconfdir}/samba/tls/key.pem)
-if [ "$PERMS" != "600" ]; then
- chmod 600 %{_sysconfdir}/samba/tls/key.pem || :
- echo "Fixed permissions of private key file %{_sysconfdir}/samba/tls/key.pem from $PERMS to 600"
- echo "Consider regenerating TLS certificate"
- echo "Removing all tls .pem files will cause an auto-regeneration with the correct permissions"
-fi
%triggerprein common -- samba4
cp -a %{_sysconfdir}/samba/smb.conf %{_sysconfdir}/samba/smb.conf.samba4
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/samba.git/commitdiff/9c584085edf966c926a00d8d82d13a787b61c080
More information about the pld-cvs-commit
mailing list