Blame SOURCES/root-warning.patch

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