[asterisk-commits] trunk - r7869 /trunk/asterisk.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Sun Jan 8 14:27:23 CST 2006
Author: markster
Date: Sun Jan 8 14:27:22 2006
New Revision: 7869
URL: http://svn.digium.com/view/asterisk?rev=7869&view=rev
Log:
you need to setgid in addition to initgroups...
Modified:
trunk/asterisk.c
Modified: trunk/asterisk.c
URL: http://svn.digium.com/view/asterisk/trunk/asterisk.c?rev=7869&r1=7868&r2=7869&view=diff
==============================================================================
--- trunk/asterisk.c (original)
+++ trunk/asterisk.c Sun Jan 8 14:27:22 2006
@@ -2171,7 +2171,11 @@
ast_log(LOG_WARNING, "No such user '%s'!\n", runuser);
exit(1);
}
- if (!ast_strlen_zero(rungroup)) {
+ if (!rungroup) {
+ if (setgid(pw->pw_gid)) {
+ ast_log(LOG_WARNING, "Unable to setgid to %d!\n", pw->pw_gid);
+ exit(1);
+ }
if (initgroups(pw->pw_name, pw->pw_gid)) {
ast_log(LOG_WARNING, "Unable to init groups for '%s'\n", runuser);
exit(1);
More information about the asterisk-commits
mailing list