tags 781776 +patch
thanks

The current problem with Postfix regarding SE Linux is that the main spool 
directory has the wrong permissions.  One way of solving this is using the 
install command.  The following applies the default SE Linux security context 
when SE Linux is activated and silently disregards the -Z option if SE Linux 
isn't activated.

--- p/postfix.preinst   2023-07-30 13:55:22.161192358 +1000
+++ p2/postfix.preinst  2023-07-30 13:55:49.274208973 +1000
@@ -16,7 +16,7 @@
 
 MASTER=/etc/postfix/master.cf
 
-(umask 022; mkdir -p /var/spool/postfix)
+install -dZ -m 755 /var/spool/postfix
 
 case "$1" in
     install)


The following is another way of doing it that is a better match for the style 
of shell scripting used for Postfix.  The -Z option to mkdir is used in the 
postinst.

--- p/postfix.preinst   2023-07-30 13:55:22.161192358 +1000
+++ p2/postfix.preinst  2023-07-30 14:02:15.295245090 +1000
@@ -16,7 +16,7 @@
 
 MASTER=/etc/postfix/master.cf
 
-(umask 022; mkdir -p /var/spool/postfix)
+mkdir -Zp -m755 /var/spool/postfix
 
 case "$1" in
     install)

-- 
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/

Reply via email to