/[Apache-SVN]/httpd/httpd/trunk/modules/arch/unix/mod_privileges.c
ViewVC logotype

Diff of /httpd/httpd/trunk/modules/arch/unix/mod_privileges.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 731251, Sun Jan 4 13:11:04 2009 UTC revision 738526, Wed Jan 28 16:23:11 2009 UTC
# Line 121  static apr_status_t privileges_end_req(v Line 121  static apr_status_t privileges_end_req(v
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  }  }
# Line 157  static int privileges_req(request_rec *r Line 157  static int privileges_req(request_rec *r
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    
# Line 253  static int privileges_postconf(apr_pool_ Line 253  static int privileges_postconf(apr_pool_
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;

Legend:
Removed from v.731251  
changed lines
  Added in v.738526

apache@apache.org
ViewVC Help
Powered by ViewVC 1.1.2