Blame SOURCES/root-warning.patch

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