]> err.no Git - systemd/commitdiff
[PATCH] make udev-test.pl test for root permissions before running
authorgreg@kroah.com <greg@kroah.com>
Thu, 11 Nov 2004 02:11:00 +0000 (18:11 -0800)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 05:09:26 +0000 (22:09 -0700)
Should prevent false error reports from happening.

test/udev-test.pl

index e615a1eda82675879c154a0f0ad412a03a6d818b..e8ce0b44ddfdbe52461d228cf84b7f0433051fb8 100644 (file)
@@ -1275,6 +1275,13 @@ sub run_test {
 
 }
 
+# only run if we have root permissions
+# due to mknod restrictions
+if (!($<==0)) {
+       print "Must have root permissions to run properly.\n";
+       exit;
+}
+
 # prepare
 system("rm -rf $udev_root");
 mkdir($udev_root) || die "unable to create udev_root: $udev_root\n";