Changeset 1474 for trunk/server
- Timestamp:
- Feb 19, 2010, 4:18:13 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/common/patches/httpd-suexec-scripts.patch
r1464 r1474 185 185 */ 186 186 - if ((uid == 0) || (uid < AP_UID_MIN)) { 187 + if ((uid == 0) || (uid < AP_UID_MIN && uid != 102)) { 187 + if ((uid == 0) || (uid < AP_UID_MIN && uid != 102)) { /* uid 102 = signup */ 188 188 log_err("cannot run as forbidden uid (%d/%s)\n", uid, cmd); 189 189 exit(107); 190 190 } 191 @@ -484,6 +563, 21@@191 @@ -484,6 +563,7 @@ 192 192 log_err("failed to setuid (%ld: %s)\n", uid, cmd); 193 193 exit(110); 194 194 } 195 + if (is_selinux_enabled()) {196 + if (uid == 102) {197 + if (setexeccon("system_u:system_r:signup_t:s0") == -1) {198 + log_err("failed to setexeccon (%ld: %s) to signup_t\n", uid, cmd);199 + exit(201);200 + }201 + } else {202 + if (setexeccon("user_u:user_r:user_t:s0") == -1) {203 + log_err("failed to setexeccon (%ld: %s) to user_t\n", uid, cmd);204 + exit(202);205 + }206 + }207 + }208 +209 195 + setenv("HOME", target_homedir, 1); 210 196
Note: See TracChangeset
for help on using the changeset viewer.