On Mon, Aug 11, 2014 at 1:06 AM, <[email protected]> wrote: > Author: takashi > Date: Mon Aug 11 05:06:50 2014 > New Revision: 1617201 > > URL: http://svn.apache.org/r1617201 > Log: > geteuid is always successful, > so remove errno reference. > > Modified: > httpd/httpd/trunk/modules/arch/unix/mod_unixd.c > > Modified: httpd/httpd/trunk/modules/arch/unix/mod_unixd.c > URL: > http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/arch/unix/mod_unixd.c?rev=1617201&r1=1617200&r2=1617201&view=diff > > ============================================================================== > --- httpd/httpd/trunk/modules/arch/unix/mod_unixd.c (original) > +++ httpd/httpd/trunk/modules/arch/unix/mod_unixd.c Mon Aug 11 05:06:50 > 2014 > @@ -150,8 +150,7 @@ AP_DECLARE(int) ap_unixd_setup_child(voi > > if (NULL != ap_unixd_config.chroot_dir) { > if (geteuid()) { > - rv = errno; >
rv still needs to get set to something non-zero as part of reporting failure to the caller; EPERM perhaps, or APR_EGENERAL? > - ap_log_error(APLOG_MARK, APLOG_ALERT, errno, NULL, > APLOGNO(02158) > + ap_log_error(APLOG_MARK, APLOG_ALERT, 0, NULL, APLOGNO(02158) > "Cannot chroot when not started as root"); > return rv; > } > > >
