mirror of
https://github.com/apache/httpd.git
synced 2026-10-23 22:49:01 +03:00
unixd_drop_privileges and ap_unixd_setup_child are almost the same, so let's remove the redundant code. geteuid is always successful, so remove errno reference. 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> mod_unixd: Make CoreDumpDirectory work for FreeBSD 11+. PR 65819. FreeBSD 11+ coredumping requires tracing enabled via procctl(PROC_TRACE_CTL). Submitted by: David CARLIER <devnexen gmail.com> Reviewed by: ylavic (by inspection) * modules/arch/unix/mod_unixd.ci (ap_unixd_setup_child): Do not test euid=0 before going chroot Nowaday chroot need CAP_SYS_CHROOT capability in its user namespace, and could work without root. Will allow to use chroot with lesser permission. Submitted by: Bastien Roucariès <rouca debian.org> PR: 69767 Submitted by: takashi, ylavic, jorton Reviewed by: jorton, rpluem, covener Github: closes #588 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1934835 13f79535-47bb-0310-9956-ffa450edef68