]> arthur.barton.de Git - netatalk.git/commitdiff
Add a check for uid 0.
authorjmarcus <jmarcus>
Mon, 11 Feb 2002 21:14:33 +0000 (21:14 +0000)
committerjmarcus <jmarcus>
Mon, 11 Feb 2002 21:14:33 +0000 (21:14 +0000)
bin/cnid/cnid_maint.in

index 2582b1a7446b2e36927f79295bb4d62d0d642d62..ead69ad12ec3ac8e3382f41e91d0ce8c05361d62 100755 (executable)
@@ -3,7 +3,7 @@
 #
 # cnid_maint: A script to maintain the consistency of CNID databases.
 #
-# $Id: cnid_maint.in,v 1.8 2002-02-11 21:10:00 jmarcus Exp $
+# $Id: cnid_maint.in,v 1.9 2002-02-11 21:14:33 jmarcus Exp $
 #
 
 use strict;
@@ -74,6 +74,10 @@ if ( $opts->{'l'} ) {
     $remove_logs = 1;
 }
 
+if ( $< != 0 ) {
+    die "You must be root to run this script.\n";
+}
+
 print "Beginning run of CNID DB Maintanence script at "
   . scalar(localtime) . ".\n\n";