]> granicus.if.org Git - cronie/commitdiff
Initscript: if unprivileged user restart deamon, it should return 4.
authorMarcela Mašláňová <mmaslano@redhat.com>
Fri, 27 Nov 2009 08:58:15 +0000 (09:58 +0100)
committerMarcela Mašláňová <mmaslano@redhat.com>
Fri, 27 Nov 2009 08:58:15 +0000 (09:58 +0100)
cronie.init

index 446607eb7ab1822df62bd7d54fdfb0667e7c0baf..d4d0a5dd3836dee9514bef66637397dff9a3a724 100755 (executable)
@@ -41,6 +41,10 @@ t=${CRON_VALIDATE_MAILRCPTS:-UNSET}
 [ "$t" != "UNSET" ] && export CRON_VALIDATE_MAILRCPTS="$t"
 
 start() {
+    if [ $UID -ne 0 ] ; then
+        echo "User has insufficient privilege."
+        exit 4
+    fi
     [ -x $exec ] || exit 5
     [ -f $config ] || exit 6
     echo -n $"Starting $prog: "