From: Marcela Mašláňová Date: Fri, 27 Nov 2009 09:10:38 +0000 (+0100) Subject: Initscript: if unprivileged user stop deamon, it should return 4. X-Git-Tag: cronie1.4.4~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8898b7040109093af1181cc947a5aa6943a8648d;p=cronie Initscript: if unprivileged user stop deamon, it should return 4. --- diff --git a/cronie.init b/cronie.init index d4d0a5d..e65c2e1 100755 --- a/cronie.init +++ b/cronie.init @@ -56,6 +56,10 @@ start() { } stop() { + if [ $UID -ne 0 ] ; then + echo "User has insufficient privilege." + exit 4 + fi echo -n $"Stopping $prog: " if [ -n "`pidfileofproc $exec`" ]; then killproc $exec