chiark / gitweb /
[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 e615a1e..e8ce0b4 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";