diff options
author | William Jon McCann <mccann@jhu.edu> | 2007-08-17 12:59:41 -0400 |
---|---|---|
committer | William Jon McCann <mccann@jhu.edu> | 2007-08-17 12:59:41 -0400 |
commit | 3423ce3039033e8bf54860a2b955fdf8c1f21be7 (patch) | |
tree | f9da817b4799d19e28c673e1e26d7a42f94fcde9 /src/main.c | |
parent | bec4b4163ae65fa271845da6b748456346987c26 (diff) | |
download | ConsoleKit2-3423ce3039033e8bf54860a2b955fdf8c1f21be7.tar.gz |
add a vt monitor test, move getfd to sysdeps, add a check for the root user
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -38,6 +38,7 @@ #include <dbus/dbus-glib.h> #include <dbus/dbus-glib-lowlevel.h> +#include "ck-sysdeps.h" #include "ck-manager.h" #include "ck-log.h" @@ -283,6 +284,11 @@ main (int argc, dbus_g_thread_init (); g_type_init (); + if (! ck_is_root_user ()) { + g_warning ("Must be run as root"); + exit (1); + } + context = g_option_context_new (_("Console kit daemon")); g_option_context_add_main_entries (context, entries, NULL); g_option_context_parse (context, &argc, &argv, NULL); |