[gdm] daemon: Move root check before settings are loaded
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] daemon: Move root check before settings are loaded
- Date: Thu, 28 Sep 2017 18:02:00 +0000 (UTC)
commit 547345e00c6916dc6b2001e4b726812c80eb3c8d
Author: Robert Ancell <robert ancell canonical com>
Date: Thu Sep 28 13:59:23 2017 -0400
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 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/daemon/main.c b/daemon/main.c
index d45fab9..468f463 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 ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]