Skip to content

Commit

Permalink
unixd_config/ap_unixd_config rename for mod_privileges
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@723078 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Eric Covener committed Dec 3, 2008
1 parent 9f5b070 commit adc039f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/arch/unix/mod_privileges.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,19 @@ static apr_status_t privileges_end_req(void *data)
&privileges_module);

/* ugly hack: grab default uid and gid from unixd */
extern unixd_config_rec unixd_config;
extern unixd_config_rec ap_unixd_config;

/* if either user or group are not the default, restore them */
if (cfg->uid || cfg->gid) {
if (setppriv(PRIV_ON, PRIV_EFFECTIVE, priv_setid) == -1) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"PRIV_ON failed restoring default user/group");
}
if (cfg->uid && (setuid(unixd_config.user_id) == -1)) {
if (cfg->uid && (setuid(ap_unixd_config.user_id) == -1)) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"Error restoring default userid");
}
if (cfg->gid && (setgid(unixd_config.group_id) == -1)) {
if (cfg->gid && (setgid(ap_unixd_config.group_id) == -1)) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
"Error restoring default group");
}
Expand Down

0 comments on commit adc039f

Please sign in to comment.