From 3423ce3039033e8bf54860a2b955fdf8c1f21be7 Mon Sep 17 00:00:00 2001 From: William Jon McCann Date: Fri, 17 Aug 2007 12:59:41 -0400 Subject: add a vt monitor test, move getfd to sysdeps, add a check for the root user --- src/main.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/main.c') 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 #include +#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); -- cgit