summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2017-09-28 13:59:23 -0400
committerRobert Ancell <robert.ancell@canonical.com>2017-09-28 14:00:49 -0400
commit547345e00c6916dc6b2001e4b726812c80eb3c8d (patch)
treecac19c7a7dabb2349cd2772724635c6411d65d04
parent9583197ab7b1e7ad471769dd3941ed729a65b988 (diff)
downloadgdm-547345e00c6916dc6b2001e4b726812c80eb3c8d.tar.gz
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
-rw-r--r--daemon/main.c14
1 files 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 ();