Merged revisions 94418 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 21 Dec 2007 15:14:52 +0000 (15:14 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 21 Dec 2007 15:14:52 +0000 (15:14 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r94418 | tilghman | 2007-12-21 09:07:42 -0600 (Fri, 21 Dec 2007) | 2 lines

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

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94419 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/asterisk.c

index 60b2544..ea464b7 100644 (file)
@@ -2959,7 +2959,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);
                        }