From f3724c3f4dfc1bc795de3e8b8985d7ff2c6813a3 Mon Sep 17 00:00:00 2001 From: Shibby Date: Mon, 1 Aug 2016 09:26:43 +0200 Subject: [PATCH] re-apply: allow run spawn-fcgi as root --- release/src/router/spawn-fcgi/src/spawn-fcgi.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/release/src/router/spawn-fcgi/src/spawn-fcgi.c b/release/src/router/spawn-fcgi/src/spawn-fcgi.c index 2f320f7fc6..3df27db077 100644 --- a/release/src/router/spawn-fcgi/src/spawn-fcgi.c +++ b/release/src/router/spawn-fcgi/src/spawn-fcgi.c @@ -385,10 +385,10 @@ static int find_user_group(const char *user, const char *group, uid_t *uid, gid_ } my_uid = my_pwd->pw_uid; - if (my_uid == 0) { - fprintf(stderr, "spawn-fcgi: I will not set uid to 0\n"); - return -1; - } +// if (my_uid == 0) { +// fprintf(stderr, "spawn-fcgi: I will not set uid to 0\n"); +// return -1; +// } if (username) *username = user; } else { @@ -407,18 +407,18 @@ static int find_user_group(const char *user, const char *group, uid_t *uid, gid_ } my_gid = my_grp->gr_gid; - if (my_gid == 0) { - fprintf(stderr, "spawn-fcgi: I will not set gid to 0\n"); - return -1; - } +// if (my_gid == 0) { +// fprintf(stderr, "spawn-fcgi: I will not set gid to 0\n"); +// return -1; +// } } } else if (my_pwd) { my_gid = my_pwd->pw_gid; - if (my_gid == 0) { - fprintf(stderr, "spawn-fcgi: I will not set gid to 0\n"); - return -1; - } +// if (my_gid == 0) { +// fprintf(stderr, "spawn-fcgi: I will not set gid to 0\n"); +// return -1; +// } } *uid = my_uid; -- 2.11.4.GIT