From 473bb56fecdc3fc0f12dd6a3c4c66b84cf6d96ca Mon Sep 17 00:00:00 2001 From: rpm-build Date: Dec 10 2020 12:17:15 +0000 Subject: root-warning.patch patch_name: root-warning.patch present_in_specfile: true location_in_specfile: 24 --- diff --git a/js/ui/main.js b/js/ui/main.js index 061303c..978f83c 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -233,6 +233,19 @@ function _initializeUI() { ['MESSAGE_ID=' + GNOMESHELL_STARTED_MESSAGE_ID]); } + let credentials = new Gio.Credentials(); + if (credentials.get_unix_user() === 0) { + notify(_('Logged in as a privileged user'), + _('Running a session as a privileged user should be avoided for security reasons. If possible, you should log in as a normal user.')); + } + + if (sessionMode.currentMode !== 'gdm' && + sessionMode.currentMode !== 'initial-setup' && + screenShield === null) { + notify(_('Screen Lock disabled'), + _('Screen Locking requires the GNOME display manager.')); + } + let perfModuleName = GLib.getenv("SHELL_PERF_MODULE"); if (perfModuleName) { let perfOutput = GLib.getenv("SHELL_PERF_OUTPUT");