From 317dae0805482d17633b846c5371ef32062c97cd Mon Sep 17 00:00:00 2001 From: robs Date: Tue, 22 Oct 2002 02:37:32 +0000 Subject: [PATCH] use the real uid to do the setuid_root (this is root in a normal run mode) --- fcgi_pm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fcgi_pm.c b/fcgi_pm.c index 7d62101..0ba49b5 100644 --- a/fcgi_pm.c +++ b/fcgi_pm.c @@ -1,5 +1,5 @@ /* - * $Id: fcgi_pm.c,v 1.81 2002/10/22 01:02:18 robs Exp $ + * $Id: fcgi_pm.c,v 1.82 2002/10/22 02:37:32 robs Exp $ */ @@ -39,8 +39,8 @@ HANDLE fcgi_event_handles[3]; #ifndef WIN32 static int seteuid_root(void) { - int rc = seteuid((uid_t)0); - if (rc == -1) { + int rc = seteuid(getuid()); + if (rc) { ap_log_error(FCGI_LOG_ALERT, fcgi_apache_main_server, "FastCGI: seteuid(0) failed"); } @@ -50,7 +50,7 @@ static int seteuid_root(void) static int seteuid_user(void) { int rc = seteuid(ap_user_id); - if (rc == -1) { + if (rc) { ap_log_error(FCGI_LOG_ALERT, fcgi_apache_main_server, "FastCGI: seteuid(%u) failed", (unsigned)ap_user_id); } -- 2.11.4.GIT