summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorWilliam Jon McCann <mccann@jhu.edu>2007-08-17 12:59:41 -0400
committerWilliam Jon McCann <mccann@jhu.edu>2007-08-17 12:59:41 -0400
commit3423ce3039033e8bf54860a2b955fdf8c1f21be7 (patch)
treef9da817b4799d19e28c673e1e26d7a42f94fcde9 /src/main.c
parentbec4b4163ae65fa271845da6b748456346987c26 (diff)
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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 90856db..12ff51e 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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);