Correctly set suexec_enabled when httpd is run by non-root

PR 42175


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@791337 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Kew
2009-07-05 23:10:30 +00:00
parent a7a08708d2
commit 777f02ed58
2 changed files with 6 additions and 1 deletions

View File

@ -272,7 +272,8 @@ unixd_pre_config(apr_pool_t *pconf, apr_pool_t *plog,
ap_unixd_config.suexec_enabled = 0;
if ((apr_stat(&wrapper, SUEXEC_BIN, APR_FINFO_NORM, ptemp))
== APR_SUCCESS) {
if ((wrapper.protection & APR_USETID) && wrapper.user == 0) {
if ((wrapper.protection & APR_USETID) && wrapper.user == 0
&& (access(SUEXEC_BIN, R_OK|X_OK) == 0)) {
ap_unixd_config.suexec_enabled = 1;
}
}