[asterisk-commits] trunk - r7857 /trunk/asterisk.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sat Jan 7 13:42:05 CST 2006


Author: markster
Date: Sat Jan  7 13:42:05 2006
New Revision: 7857

URL: http://svn.digium.com/view/asterisk?rev=7857&view=rev
Log:
Initialize groups properly

Modified:
    trunk/asterisk.c

Modified: trunk/asterisk.c
URL: http://svn.digium.com/view/asterisk/trunk/asterisk.c?rev=7857&r1=7856&r2=7857&view=diff
==============================================================================
--- trunk/asterisk.c (original)
+++ trunk/asterisk.c Sat Jan  7 13:42:05 2006
@@ -2171,6 +2171,10 @@
 			ast_log(LOG_WARNING, "No such user '%s'!\n", runuser);
 			exit(1);
 		}
+		if (initgroups(pw->pw_name, pw->pw_gid)) {
+			ast_log(LOG_WARNING, "Unable to init groups for '%s'\n", runuser);
+			exit(1);
+		}
 		if (setuid(pw->pw_uid)) {
 			ast_log(LOG_WARNING, "Unable to setuid to %d (%s)\n", pw->pw_uid, runuser);
 			exit(1);



More information about the asterisk-commits mailing list