From 89b58e85526bb7580b5df6da67a9894f118bd910 Mon Sep 17 00:00:00 2001 From: Takashi Sato Date: Tue, 19 Aug 2014 01:27:38 +0000 Subject: 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 --- modules/arch/unix/mod_unixd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/arch') diff --git a/modules/arch/unix/mod_unixd.c b/modules/arch/unix/mod_unixd.c index bb056c01c0..09343d368e 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) { -- cgit v1.2.3