diff options
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) { |