| 140 |
*/ |
*/ |
| 141 |
if ((cfg->mode == PRIV_SECURE) || |
if ((cfg->mode == PRIV_SECURE) || |
| 142 |
((cfg->mode == PRIV_SELECTIVE) && (dcfg->mode == PRIV_SECURE))) { |
((cfg->mode == PRIV_SELECTIVE) && (dcfg->mode == PRIV_SECURE))) { |
|
// return APR_SUCCESS; |
|
| 143 |
exit(0); |
exit(0); |
| 144 |
} |
} |
| 145 |
|
|
| 166 |
} |
} |
| 167 |
return APR_SUCCESS; |
return APR_SUCCESS; |
| 168 |
} |
} |
|
#if 0 |
|
|
static apr_status_t privileges_end_proc(void *data) |
|
|
{ |
|
|
/* FIXME |
|
|
* The process exists only for the request, and was created |
|
|
* on the request pool which is now being destroyed. |
|
|
* Need to figure out what needs doing here. |
|
|
*/ |
|
|
exit(0); |
|
|
} |
|
|
#endif |
|
| 169 |
static int privileges_req(request_rec *r) |
static int privileges_req(request_rec *r) |
| 170 |
{ |
{ |
| 171 |
/* secure mode: fork a process to handle the request */ |
/* secure mode: fork a process to handle the request */ |
| 236 |
return DONE; |
return DONE; |
| 237 |
case APR_INCHILD: |
case APR_INCHILD: |
| 238 |
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "In child!"); |
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "In child!"); |
|
// apr_pool_cleanup_register(r->pool, r, privileges_end_proc, |
|
|
// apr_pool_cleanup_null); |
|
| 239 |
break; /* now we'll drop privileges in the child */ |
break; /* now we'll drop privileges in the child */ |
| 240 |
default: |
default: |
| 241 |
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, |
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, |
| 386 |
static int privileges_init(apr_pool_t *pconf, apr_pool_t *plog, |
static int privileges_init(apr_pool_t *pconf, apr_pool_t *plog, |
| 387 |
apr_pool_t *ptemp) |
apr_pool_t *ptemp) |
| 388 |
{ |
{ |
|
#if 0 |
|
| 389 |
/* refuse to work if the MPM is threaded */ |
/* refuse to work if the MPM is threaded */ |
| 390 |
int threaded; |
int threaded; |
| 391 |
int rv = ap_mpm_query(AP_MPMQ_IS_THREADED, &threaded); |
int rv = ap_mpm_query(AP_MPMQ_IS_THREADED, &threaded); |
| 400 |
"mod_privileges is not compatible with a threaded MPM."); |
"mod_privileges is not compatible with a threaded MPM."); |
| 401 |
return !OK; |
return !OK; |
| 402 |
} |
} |
|
#endif |
|
| 403 |
return OK; |
return OK; |
| 404 |
} |
} |
| 405 |
static void privileges_hooks(apr_pool_t *pool) |
static void privileges_hooks(apr_pool_t *pool) |