summaryrefslogtreecommitdiffstats
path: root/modules/arch
diff options
context:
space:
mode:
authorTakashi Sato <takashi@apache.org>2014-08-19 03:27:38 +0200
committerTakashi Sato <takashi@apache.org>2014-08-19 03:27:38 +0200
commit89b58e85526bb7580b5df6da67a9894f118bd910 (patch)
treecd72568b140804a7de570455a7c894d3cdeaf263 /modules/arch
parentmod_systemd.xml: delete application/xml property (diff)
downloadapache2-89b58e85526bb7580b5df6da67a9894f118bd910.tar.xz
apache2-89b58e85526bb7580b5df6da67a9894f118bd910.zip
Follow up r1617201:
Return EPERM if the uid is not root on chroot-ing. Pointed out by trawick on <CAKUrXK6EGmG1ZD4+UFZ05yznTe6twOU3n57YeO-Ney-_VV_dCQ@mail.gmail.com> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1618778 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/arch')
-rw-r--r--modules/arch/unix/mod_unixd.c2
1 files changed, 1 insertions, 1 deletions
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) {