summaryrefslogtreecommitdiff
path: root/udevd.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2006-09-03 03:04:20 +0200
committerKay Sievers <kay.sievers@suse.de>2006-09-03 03:04:20 +0200
commitfc89fe7edf83af465c1835d8eb985e4298ad2417 (patch)
tree4b1d5b230e5c51e3d41dd9348d4c833abab2e3be /udevd.c
parent3c2081fcb7e3c5483953aa8226112360fcb1aed7 (diff)
udevtrigger: options to filter by subsystem and sysfs attribute
Diffstat (limited to 'udevd.c')
-rw-r--r--udevd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/udevd.c b/udevd.c
index bb956b520c..0702f5e2cb 100644
--- a/udevd.c
+++ b/udevd.c
@@ -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) {