]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
debian: Allow use of secondary groups
authorPeter Wu <peter@lekensteyn.nl>
Mon, 15 Sep 2014 18:49:42 +0000 (20:49 +0200)
committerTravis Cross <tc@traviscross.com>
Fri, 7 Nov 2014 18:10:50 +0000 (18:10 +0000)
When '-g' is passed, freeswitch drops all other groups except for the
given group.  This impacts people who depend on FS having access to
resources that would be allowed by membership to those other groups.

It was possible to override this by setting DAEMON_ARGS in
/etc/default/freeswitch, but we'll go ahead and make this the default.

Since freeswitch uses the primary group of a user when `-g` is
omitted, we'll just omit it, and do similarly when setting the
ownership of our directory in /var/run.

Edited-by: Travis Cross <tc@traviscross.com>
debian/freeswitch-sysvinit.freeswitch.init

index f393ff48a6bf3707b55e9f261cd17796ea97eaac..98be1af324f5a0bf1b725369e39e5af60a4fca81 100644 (file)
@@ -19,8 +19,7 @@ DESC=freeswitch
 NAME=freeswitch
 DAEMON=/usr/bin/freeswitch
 USER=freeswitch
-GROUP=freeswitch
-DAEMON_ARGS="-u $USER -g $GROUP -ncwait"
+DAEMON_ARGS="-u $USER -ncwait"
 CONFDIR=/etc/$NAME
 RUNDIR=/var/run/$NAME
 PIDFILE=$RUNDIR/$NAME.pid
@@ -43,7 +42,7 @@ do_start() {
 
   # Directory in /var/run may disappear on reboot (e.g. when tmpfs used for /var/run).
   mkdir -p $RUNDIR
-  chown -R $USER:$GROUP $RUNDIR
+  chown -R $USER: $RUNDIR
   chmod -R ug=rwX,o= $RUNDIR
 
   start-stop-daemon --start --quiet \