commit 10b13b5abba470f51061026b0bdcc47067b22983
Author: Jeroen Dekkers <jeroen@dekkers.ch>
Date:   Fri Jul 6 20:04:03 2012 +0200

    Do not run yate as root, but use cap_sys_nice capability to be able set the thread priority

diff --git a/debian/control b/debian/control
index ec368ec..47e90b1 100644
--- a/debian/control
+++ b/debian/control
@@ -29,7 +29,7 @@ Vcs-Browser: http://svn.debian.org/wsvn/pkg-voip/yate/?op=log
 
 Package: yate
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, yate-core (= ${binary:Version})
+Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, yate-core (= ${binary:Version}), libcap2-bin
 Description: Yet Another Telephony Engine (YATE)
  YATE is a telephony engine aimed at creating a telephony server that
  performs well enough to deal with PBX requirements and also flexible
diff --git a/debian/yate.init b/debian/yate.init
index 014e7d6..0c40f20 100644
--- a/debian/yate.init
+++ b/debian/yate.init
@@ -42,7 +42,7 @@ case "$1" in
 	unset DISPLAY
 
 	start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE \
-		--user $YATE_USER --group $YATE_GROUP \
+		--chuid $YATE_USER --group $YATE_GROUP \
 		--exec $DAEMON -- -p $PIDFILE $DAEMON_OPTS
 	echo "$NAME."
 	;;
@@ -61,7 +61,7 @@ case "$1" in
 	sleep 1
 
         start-stop-daemon --start --quiet --pidfile $PIDFILE \
-                --user $YATE_USER --group $YATE_GROUP \
+                --chuid $YATE_USER --group $YATE_GROUP \
                 --exec $DAEMON -- -p $PIDFILE $DAEMON_OPTS
 	echo "$NAME."
 	;;
diff --git a/debian/yate.postinst b/debian/yate.postinst
index 93fcdbe..e39c3ff 100644
--- a/debian/yate.postinst
+++ b/debian/yate.postinst
@@ -17,6 +17,7 @@ case "$1" in
 
 	mkdir -p /var/lib/yate
 	chown -R yate:yate /var/lib/yate
+	setcap cap_sys_nice=eip /usr/bin/yate
 	;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
