Changeset 406 for server/common


Ignore:
Timestamp:
Sep 17, 2007, 4:37:52 PM (17 years ago)
Author:
andersk
Message:
Reapply selinux fix from r403.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • server/common/patches/httpd-suexec-scripts.patch

    r405 r406  
    127127         exit(107);
    128128     }
    129 @@ -482,6 +533,17 @@
     129@@ -482,6 +533,19 @@
    130130         log_err("failed to setuid (%ld: %s)\n", uid, cmd);
    131131         exit(110);
    132132     }
    133 +    if (uid == 102) {
    134 +        if (setexeccon("system_u:system_r:signup_t:s0") == -1) {
    135 +            log_err("failed to setexeccon (%ld: %s) to signup_t\n", uid, cmd);
    136 +            exit(201);
    137 +        }
    138 +    } else {
    139 +        if (setexeccon("user_u:user_r:user_t:s0") == -1) {
    140 +            log_err("failed to setexeccon (%ld: %s) to user_t\n", uid, cmd);
    141 +            exit(202);
     133+    if (is_selinux_enabled()) {
     134+        if (uid == 102) {
     135+            if (setexeccon("system_u:system_r:signup_t:s0") == -1) {
     136+                log_err("failed to setexeccon (%ld: %s) to signup_t\n", uid, cmd);
     137+                exit(201);
     138+            }
     139+        } else {
     140+            if (setexeccon("user_u:user_r:user_t:s0") == -1) {
     141+                log_err("failed to setexeccon (%ld: %s) to user_t\n", uid, cmd);
     142+                exit(202);
     143+            }
    142144+        }
    143145+    }
Note: See TracChangeset for help on using the changeset viewer.