]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* Instead of unixd_setup_child run the drop_privileges hook to switch the
authorRuediger Pluem <rpluem@apache.org>
Tue, 4 Nov 2008 11:55:25 +0000 (11:55 +0000)
committerRuediger Pluem <rpluem@apache.org>
Tue, 4 Nov 2008 11:55:25 +0000 (11:55 +0000)
  userid / groupid.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@711234 13f79535-47bb-0310-9956-ffa450edef68

modules/generators/mod_cgid.c

index 29f38b9ae7166f6e97b588155f658b737cfe1d0d..f07ff7a755ab5a280465aebe487c2c56821f62fc 100644 (file)
@@ -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;