summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
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);