fixed a regression in setgroups()

This commit is contained in:
roberto@dj2
2011-03-28 05:38:29 -05:00
parent 4ec1493b09
commit 30beab4017
3 changed files with 13 additions and 0 deletions
+4
View File
@@ -357,6 +357,10 @@ void uwsgi_as_root() {
uwsgi_error("setgid()");
exit(1);
}
if (setgroups(0, NULL)) {
uwsgi_error("setgroups()");
exit(1);
}
}
if (uwsgi.uid) {
if (!uwsgi.master_as_root) uwsgi_log("setuid() to %d\n", uwsgi.uid);
+7
View File
@@ -957,6 +957,13 @@ options_parsed:
uwsgi.shared_sockets[i].bound = 1;
}
// call jail systems
for(i =0; i < uwsgi.gp_cnt; i++) {
if (uwsgi.gp[i]->jail) {
uwsgi.gp[i]->jail(uwsgi_start, argv);
}
}
#ifdef __linux__
+2
View File
@@ -507,6 +507,8 @@ struct uwsgi_plugin {
uint16_t (*rpc)(void *, uint8_t, char **, char *);
void (*jail) (int (*)(void *), char**);
struct uwsgi_help_item *help;
};