Fix for restart-as-user problem reported via the -dev list

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@94418 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.4
Tilghman Lesher 18 years ago
parent 32c8a851c7
commit 2f24e1b1bf

@ -2749,7 +2749,7 @@ int main(int argc, char *argv[])
ast_log(LOG_WARNING, "Unable to setgid to %d!\n", (int)pw->pw_gid);
exit(1);
}
if (initgroups(pw->pw_name, pw->pw_gid)) {
if (isroot && initgroups(pw->pw_name, pw->pw_gid)) {
ast_log(LOG_WARNING, "Unable to init groups for '%s'\n", runuser);
exit(1);
}

Loading…
Cancel
Save