Skip to content

Commit 08cc879

Browse files
Takashi Satonotroj
authored andcommitted
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 (cherry picked from commit 89b58e8)
1 parent 07ad1d1 commit 08cc879

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/arch/unix/mod_unixd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ AP_DECLARE(int) ap_unixd_setup_child(void)
152152
if (geteuid()) {
153153
ap_log_error(APLOG_MARK, APLOG_ALERT, 0, NULL, APLOGNO(02158)
154154
"Cannot chroot when not started as root");
155-
return rv;
155+
return EPERM;
156156
}
157157

158158
if (chdir(ap_unixd_config.chroot_dir) != 0) {

0 commit comments

Comments
 (0)