From 6f6a70392da74d6507c205f8ad9774873b5b95e4 Mon Sep 17 00:00:00 2001 From: Camille Oudot Date: Thu, 26 Nov 2015 15:39:26 +0100 Subject: [PATCH] add option to set the group owning /proc/rtpengine --- el/rtpengine.init | 8 +++++++- el/rtpengine.sysconfig | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/el/rtpengine.init b/el/rtpengine.init index 70e9f9bf3..5b584eb59 100644 --- a/el/rtpengine.init +++ b/el/rtpengine.init @@ -182,7 +182,13 @@ start() { rmmod xt_RTPENGINE 2> /dev/null if [[ -n "$RE_USER" ]] then - modprobe xt_RTPENGINE set_proc_id=1 proc_uid=$(id $RE_USER -u) proc_gid=$(id $RE_USER -g) + if [[ -n "$RE_GROUP" ]] + then + proc_gid=$(grep ^$RE_GROUP: /etc/group | cut -f3 -d:) + else + proc_gid=$(id $RE_USER -g) + fi + modprobe xt_RTPENGINE proc_uid=$(id $RE_USER -u) proc_gid=$proc_gid else modprobe xt_RTPENGINE fi diff --git a/el/rtpengine.sysconfig b/el/rtpengine.sysconfig index 11a7b276d..b878e6aff 100644 --- a/el/rtpengine.sysconfig +++ b/el/rtpengine.sysconfig @@ -42,3 +42,5 @@ LISTEN_UDP=127.0.0.1:2222 # IP address and port combination for UDP #B2B_URL=http://127.0.0.1:8080/xmlrpc #RE_USER=rtpengine # Run rtpengine as this specific user + +#RE_GROUP=rtpengine # allow this group to control rtpengine in kernel mode