[Freeswitch-svn] [commit] r9892 - freeswitch/trunk/src

Freeswitch SVN anthm at freeswitch.org
Wed Oct 8 10:53:33 EDT 2008


Author: anthm
Date: Wed Oct  8 10:53:31 2008
New Revision: 9892

Modified:
   freeswitch/trunk/src/switch_core.c

Log:
fix restart + -u issue FSCORE-199

Modified: freeswitch/trunk/src/switch_core.c
==============================================================================
--- freeswitch/trunk/src/switch_core.c	(original)
+++ freeswitch/trunk/src/switch_core.c	Wed Oct  8 10:53:31 2008
@@ -564,6 +564,11 @@
 		runas_gid = gr->gr_gid;
 	}
 
+	if (runas_uid && getuid() == runas_uid && (!runas_gid || runas_gid == getgid())) {
+		/* already running as the right user and group, nothing to do! */
+		return 0;
+	}
+
 	if (runas_uid) {
 #ifdef HAVE_SETGROUPS
 		/*



More information about the Freeswitch-svn mailing list