From: Ruediger Pluem Date: Tue, 4 Nov 2008 11:55:25 +0000 (+0000) Subject: * Instead of unixd_setup_child run the drop_privileges hook to switch the X-Git-Tag: 2.3.0~147 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46d3287ea61f28b5194b381d0335d45217081881;p=thirdparty%2Fapache%2Fhttpd.git * Instead of unixd_setup_child run the drop_privileges hook to switch the userid / groupid. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@711234 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/generators/mod_cgid.c b/modules/generators/mod_cgid.c index 29f38b9ae71..f07ff7a755a 100644 --- a/modules/generators/mod_cgid.c +++ b/modules/generators/mod_cgid.c @@ -59,7 +59,7 @@ #include "http_log.h" #include "util_script.h" #include "ap_mpm.h" -#include "unixd.h" +#include "mpm_common.h" #include "mod_suexec.h" #include "../filters/mod_include.h" @@ -630,7 +630,10 @@ static int cgid_server(void *data) } } - unixd_setup_child(); /* if running as root, switch to configured user/group */ + /* if running as root, switch to configured user/group */ + if ((rc = ap_run_drop_privileges(pcgi, ap_server_conf)) != 0) { + return rc; + } while (!daemon_should_exit) { int errfileno = STDERR_FILENO;