diff options
author | Kay Sievers <kay.sievers@suse.de> | 2006-09-03 03:04:20 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@suse.de> | 2006-09-03 03:04:20 +0200 |
commit | fc89fe7edf83af465c1835d8eb985e4298ad2417 (patch) | |
tree | 4b1d5b230e5c51e3d41dd9348d4c833abab2e3be /udevd.c | |
parent | 3c2081fcb7e3c5483953aa8226112360fcb1aed7 (diff) |
udevtrigger: options to filter by subsystem and sysfs attribute
Diffstat (limited to 'udevd.c')
-rw-r--r-- | udevd.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -926,12 +926,6 @@ int main(int argc, char *argv[], char *envp[]) selinux_init(); dbg("version %s", UDEV_VERSION); - if (getuid() != 0) { - fprintf(stderr, "root privileges required\n"); - err("root privileges required"); - goto exit; - } - /* parse commandline options */ for (i = 1 ; i < argc; i++) { char *arg = argv[i]; @@ -946,6 +940,12 @@ int main(int argc, char *argv[], char *envp[]) } } + if (getuid() != 0) { + fprintf(stderr, "root privileges required\n"); + err("root privileges required"); + goto exit; + } + /* init sockets to receive events */ if (init_udevd_socket() < 0) { if (errno == EADDRINUSE) { |