From e340874723b86a0a7a191c5ad2c9bbad423a1746 Mon Sep 17 00:00:00 2001 From: rpm-build Date: Jan 15 2021 06:11:27 +0000 Subject: root-warning.patch patch_name: root-warning.patch present_in_specfile: true location_in_specfile: 28 --- 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");