From 547345e00c6916dc6b2001e4b726812c80eb3c8d Mon Sep 17 00:00:00 2001 From: Robert Ancell Date: Thu, 28 Sep 2017 13:59:23 -0400 Subject: daemon: Move root check before settings are loaded The root check doesn't require settings and may be the cause of settings failing to load. https://bugzilla.gnome.org/show_bug.cgi?id=788301 --- daemon/main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/daemon/main.c b/daemon/main.c index d45fab9b..468f463d 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -348,6 +348,13 @@ main (int argc, exit (1); } + /* XDM compliant error message */ + if (getuid () != 0) { + /* make sure the pid file doesn't get wiped */ + g_warning (_("Only the root user can run GDM")); + exit (-1); + } + if (fatal_warnings) { GLogLevelFlags fatal_mask; @@ -370,13 +377,6 @@ main (int argc, gdm_daemon_ensure_dirs (gdm_uid, gdm_gid); - /* XDM compliant error message */ - if (getuid () != 0) { - /* make sure the pid file doesn't get wiped */ - g_warning (_("Only the root user can run GDM")); - exit (-1); - } - /* Connect to the bus, own the name and start the manager */ bus_reconnect (); -- cgit v1.2.1