From 735d99b14ebef9aa775b82f2fff17cca07c9f48c Mon Sep 17 00:00:00 2001 From: Petr Písař Date: Feb 04 2011 12:04:49 +0000 Subject: Do not allow non-root to control quota_nld service --- diff --git a/quota.spec b/quota.spec index d3f9b8b..f224810 100644 --- a/quota.spec +++ b/quota.spec @@ -267,6 +267,7 @@ rm -rf %{buildroot} %changelog * Fri Feb 04 2011 Petr Pisar - 1:4.00-0.6.pre1 - Store quota_nld PID into PID file (bug #634137) +- Do not allow non-root to control quota_nld service (bug #634137) * Wed Feb 02 2011 Petr Pisar - 1:4.00-0.5.pre1 - Correct manual pages diff --git a/quota_nld.init b/quota_nld.init old mode 100755 new mode 100644 index e54deec..1b52453 --- a/quota_nld.init +++ b/quota_nld.init @@ -29,6 +29,7 @@ prog="quota_nld" lockfile=/var/lock/subsys/$prog start() { + [ "$(id -u)" -eq 0 ] || exit 4 [ -x $exec ] || exit 5 echo -n $"Starting $prog: " daemon $exec $QUOTA_NLD_OPTS @@ -39,6 +40,7 @@ start() { } stop() { + [ "$(id -u)" -eq 0 ] || exit 4 echo -n $"Stopping $prog: " killproc $prog retval=$?