From: Takashi Sato Date: Tue, 19 Aug 2014 01:27:38 +0000 (+0000) Subject: Follow up r1617201: X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae8b790a596c2d844ddd4dbcb2ca7f154d98d797;p=thirdparty%2Fapache%2Fhttpd.git Follow up r1617201: Return EPERM if the uid is not root on chroot-ing. Pointed out by trawick on git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1618778 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/arch/unix/mod_unixd.c b/modules/arch/unix/mod_unixd.c index bb056c01c08..09343d368e2 100644 --- a/modules/arch/unix/mod_unixd.c +++ b/modules/arch/unix/mod_unixd.c @@ -152,7 +152,7 @@ AP_DECLARE(int) ap_unixd_setup_child(void) if (geteuid()) { ap_log_error(APLOG_MARK, APLOG_ALERT, 0, NULL, APLOGNO(02158) "Cannot chroot when not started as root"); - return rv; + return EPERM; } if (chdir(ap_unixd_config.chroot_dir) != 0) {