Procházet zdrojové kódy

exim/procmail command permissions

Bob Mottram před 8 roky
rodič
revize
3f58fc17d2
2 změnil soubory, kde provedl 28 přidání a 0 odebrání
  1. 18
    0
      src/freedombone-base-email
  2. 10
    0
      src/freedombone-utils-setup

+ 18
- 0
src/freedombone-base-email Zobrazit soubor

@@ -907,6 +907,13 @@ function install_email_with_tor {
907 907
         chown -R $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Maildir
908 908
     fi
909 909
 
910
+    if [ -f /usr/sbin/exim ]; then
911
+        chmod u+s /usr/sbin/exim
912
+    fi
913
+    if [ -f /usr/sbin/exim4 ]; then
914
+        chmod u+s /usr/sbin/exim4
915
+    fi
916
+
910 917
     function_check configure_firewall_for_email
911 918
     configure_firewall_for_email
912 919
     dpkg-reconfigure --frontend noninteractive exim4-config
@@ -1018,6 +1025,13 @@ function install_email_basic {
1018 1025
     function_check configure_firewall_for_email
1019 1026
     configure_firewall_for_email
1020 1027
 
1028
+    if [ -f /usr/sbin/exim ]; then
1029
+        chmod u+s /usr/sbin/exim
1030
+    fi
1031
+    if [ -f /usr/sbin/exim4 ]; then
1032
+        chmod u+s /usr/sbin/exim4
1033
+    fi
1034
+
1021 1035
     dpkg-reconfigure --frontend noninteractive exim4-config
1022 1036
     systemctl restart exim4
1023 1037
 }
@@ -1061,6 +1075,10 @@ function create_procmail {
1061 1075
         chown root:root /etc/skel/.procmailrc
1062 1076
     fi
1063 1077
 
1078
+    if [ -f /usr/bin/procmail ]; then
1079
+        chmod 6755 /usr/bin/procmail
1080
+    fi
1081
+
1064 1082
     mark_completed $FUNCNAME
1065 1083
 }
1066 1084
 

+ 10
- 0
src/freedombone-utils-setup Zobrazit soubor

@@ -456,6 +456,16 @@ function lockdown_permissions {
456 456
     chmod 4755 /usr/bin/sudo
457 457
     chmod 4755 /usr/lib/sudo/sudoers.so
458 458
     chown root:root /etc/sudoers
459
+
460
+    if [ -f /usr/bin/procmail ]; then
461
+        chmod 6755 /usr/bin/procmail
462
+    fi
463
+    if [ -f /usr/sbin/exim ]; then
464
+        chmod u+s /usr/sbin/exim
465
+    fi
466
+    if [ -f /usr/sbin/exim4 ]; then
467
+        chmod u+s /usr/sbin/exim4
468
+    fi
459 469
 }
460 470
 
461 471
 function disable_core_dumps {