Add a posibility to set socker owner to init scripts.
Signed-off-by: Jan Safranek <[email protected]>
---
samples/cgred.conf | 5 +++++
scripts/init.d/cgred.in | 6 ++++++
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/samples/cgred.conf b/samples/cgred.conf
index 6acbf79..4802879 100644
--- a/samples/cgred.conf
+++ b/samples/cgred.conf
@@ -14,6 +14,11 @@ CONFIG_FILE="/etc/cgrules.conf"
NODAEMON=""
#NODAEMON="--nodaemon"
+# Set owner of cgred socket. 'cgexec' tool should have write access there
+# (either using suid and/or sgid permissions or Linux capabilities).
+SOCKET_USER=""
+SOCKET_GROUP="cgred"
+
# Uncomment the second line to disable logging for CGroup Rules Engine
# Uncomment the third line to enable more verbose logging.
LOG=""
diff --git a/scripts/init.d/cgred.in b/scripts/init.d/cgred.in
index ba89aee..c05ddf0 100644
--- a/scripts/init.d/cgred.in
+++ b/scripts/init.d/cgred.in
@@ -50,6 +50,12 @@ if [ -f "/etc/sysconfig/cgred.conf" ] ; then
if [ -n "$LOG_FILE" ]; then
OPTIONS="$OPTIONS --log-file=$LOG_FILE"
fi
+ if [ -n "$SOCKET_USER" ]; then
+ OPTIONS="$OPTIONS -u $SOCKET_USER"
+ fi
+ if [ -n "$SOCKET_GROUP" ]; then
+ OPTIONS="$OPTIONS -g $SOCKET_GROUP"
+ fi
else
OPTIONS=""
fi
------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel