Blame SOURCES/root-warning.patch

441107
From 45ddeeaa317fb0ffd045600d9e4b95143c9ca8b8 Mon Sep 17 00:00:00 2001
441107
From: Matthias Clasen <mclasen@redhat.com>
441107
Date: Sat, 8 Jun 2013 13:32:35 -0400
441107
Subject: [PATCH 1/2] main: Show a warning when running as root
441107
441107
gnome-session used to show a dialog in this case, but a
441107
notification is more natural nowadays. Doing it in gnome-shell
441107
avoids complicated synchronization between gnome-session and
441107
gnome-shell.
441107
441107
https://bugzilla.gnome.org/show_bug.cgi?id=701212
441107
---
441107
 js/ui/main.js | 6 ++++++
441107
 1 file changed, 6 insertions(+)
441107
441107
diff --git a/js/ui/main.js b/js/ui/main.js
441107
index 8d1755cf1..abf8a8765 100644
441107
--- a/js/ui/main.js
441107
+++ b/js/ui/main.js
441107
@@ -237,6 +237,12 @@ function _initializeUI() {
441107
                                         ['MESSAGE_ID=' + GNOMESHELL_STARTED_MESSAGE_ID]);
441107
         }
441107
 
441107
+        let credentials = new Gio.Credentials();
441107
+        if (credentials.get_unix_user() === 0) {
441107
+            notify(_('Logged in as a privileged user'),
441107
+                   _('Running a session as a privileged user should be avoided for security reasons. If possible, you should log in as a normal user.'));
441107
+        }
441107
+
441107
         let perfModuleName = GLib.getenv("SHELL_PERF_MODULE");
441107
         if (perfModuleName) {
441107
             let perfOutput = GLib.getenv("SHELL_PERF_OUTPUT");
441107
-- 
441107
2.23.0
441107
441107
441107
From 8e82907909b6a2e5af5da3f93b087df4b7eb48b5 Mon Sep 17 00:00:00 2001
441107
From: Matthias Clasen <mclasen@redhat.com>
441107
Date: Sat, 8 Jun 2013 13:33:58 -0400
441107
Subject: [PATCH 2/2] main: Show a warning when gdm is missing
441107
441107
If we are not running under gdm, some functionaliy (such as
441107
the lock screen) does not work, and we should inform the
441107
user about this.
441107
441107
https://bugzilla.gnome.org/show_bug.cgi?id=701212
441107
---
441107
 js/ui/main.js | 7 +++++++
441107
 1 file changed, 7 insertions(+)
441107
441107
diff --git a/js/ui/main.js b/js/ui/main.js
441107
index abf8a8765..be49c750e 100644
441107
--- a/js/ui/main.js
441107
+++ b/js/ui/main.js
441107
@@ -243,6 +243,13 @@ function _initializeUI() {
441107
                    _('Running a session as a privileged user should be avoided for security reasons. If possible, you should log in as a normal user.'));
441107
         }
441107
 
441107
+        if (sessionMode.currentMode !== 'gdm' &&
441107
+            sessionMode.currentMode !== 'initial-setup' &&
441107
+            screenShield === null) {
441107
+            notify(_('Screen Lock disabled'),
441107
+                   _('Screen Locking requires the GNOME display manager.'));
441107
+        }
441107
+
441107
         let perfModuleName = GLib.getenv("SHELL_PERF_MODULE");
441107
         if (perfModuleName) {
441107
             let perfOutput = GLib.getenv("SHELL_PERF_OUTPUT");
441107
-- 
441107
2.23.0
441107