| 121 |
/* restore default privileges */ |
/* restore default privileges */ |
| 122 |
if (setppriv(PRIV_SET, PRIV_EFFECTIVE, priv_default) == -1) { |
if (setppriv(PRIV_SET, PRIV_EFFECTIVE, priv_default) == -1) { |
| 123 |
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, |
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, |
| 124 |
"Error restoring default privileges: %s"); |
"Error restoring default privileges: %s", strerror(errno)); |
| 125 |
} |
} |
| 126 |
return APR_SUCCESS; |
return APR_SUCCESS; |
| 127 |
} |
} |
| 157 |
/* set vhost's privileges */ |
/* set vhost's privileges */ |
| 158 |
if (setppriv(PRIV_SET, PRIV_EFFECTIVE, cfg->priv) == -1) { |
if (setppriv(PRIV_SET, PRIV_EFFECTIVE, cfg->priv) == -1) { |
| 159 |
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, |
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, |
| 160 |
"Error setting effective privileges: %s"); |
"Error setting effective privileges: %s", strerror(errno)); |
| 161 |
return HTTP_INTERNAL_SERVER_ERROR; |
return HTTP_INTERNAL_SERVER_ERROR; |
| 162 |
} |
} |
| 163 |
|
|
| 164 |
/* ... including those of any subprocesses */ |
/* ... including those of any subprocesses */ |
| 165 |
if (setppriv(PRIV_SET, PRIV_INHERITABLE, cfg->child_priv) == -1) { |
if (setppriv(PRIV_SET, PRIV_INHERITABLE, cfg->child_priv) == -1) { |
| 166 |
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, |
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, |
| 167 |
"Error setting inheritable privileges: %s"); |
"Error setting inheritable privileges: %s", strerror(errno)); |
| 168 |
return HTTP_INTERNAL_SERVER_ERROR; |
return HTTP_INTERNAL_SERVER_ERROR; |
| 169 |
} |
} |
| 170 |
if (setppriv(PRIV_SET, PRIV_LIMIT, cfg->child_priv) == -1) { |
if (setppriv(PRIV_SET, PRIV_LIMIT, cfg->child_priv) == -1) { |
| 171 |
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, |
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, |
| 172 |
"Error setting limit privileges: %s"); |
"Error setting limit privileges: %s", strerror(errno)); |
| 173 |
return HTTP_INTERNAL_SERVER_ERROR; |
return HTTP_INTERNAL_SERVER_ERROR; |
| 174 |
} |
} |
| 175 |
|
|
| 253 |
priv_emptyset(priv_setid); |
priv_emptyset(priv_setid); |
| 254 |
if (priv_addset(priv_setid, PRIV_PROC_SETID) == -1) { |
if (priv_addset(priv_setid, PRIV_PROC_SETID) == -1) { |
| 255 |
ap_log_perror(APLOG_MARK, APLOG_CRIT, 0, ptemp, |
ap_log_perror(APLOG_MARK, APLOG_CRIT, 0, ptemp, |
| 256 |
"priv_addset: ", strerror(errno)); |
"priv_addset: %s", strerror(errno)); |
| 257 |
return !OK; |
return !OK; |
| 258 |
} |
} |
| 259 |
return OK; |
return OK; |