Blame SOURCES/fix-partial-lock-bypass.patch

067a6b
From d90d7e22143949d59880981fe53adcfad27a5fd3 Mon Sep 17 00:00:00 2001
067a6b
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
067a6b
Date: Wed, 23 Jan 2019 23:55:12 +0100
067a6b
Subject: [PATCH 1/2] panel: Don't allow opening hidden menus via keybindings
067a6b
067a6b
We shouldn't allow toggling menus that aren't supported by the
067a6b
current session mode, but as indicators are hidden rather than
067a6b
destroyed on mode switches, it is not enough to check for an
067a6b
indicator's existence.
067a6b
067a6b
https://gitlab.gnome.org/GNOME/gnome-shell/issues/851
067a6b
---
067a6b
 js/ui/panel.js | 4 ++--
067a6b
 1 file changed, 2 insertions(+), 2 deletions(-)
067a6b
067a6b
diff --git a/js/ui/panel.js b/js/ui/panel.js
067a6b
index 2f593247d..02667f92f 100644
067a6b
--- a/js/ui/panel.js
067a6b
+++ b/js/ui/panel.js
067a6b
@@ -985,8 +985,8 @@ var Panel = new Lang.Class({
067a6b
     },
067a6b
 
067a6b
     _toggleMenu(indicator) {
067a6b
-        if (!indicator) // menu not supported by current session mode
067a6b
-            return;
067a6b
+        if (!indicator || !indicator.container.visible)
067a6b
+            return; // menu not supported by current session mode
067a6b
 
067a6b
         let menu = indicator.menu;
067a6b
         if (!indicator.actor.reactive)
067a6b
-- 
067a6b
2.23.0
067a6b
067a6b
067a6b
From 5083ad899c976f7221848500fc9d4bb393a66327 Mon Sep 17 00:00:00 2001
067a6b
From: Ray Strode <rstrode@redhat.com>
067a6b
Date: Wed, 23 Jan 2019 15:59:42 -0500
067a6b
Subject: [PATCH 2/2] shellActionModes: disable POPUP keybindings in unlock
067a6b
 screen
067a6b
067a6b
Certain keybindings should continue to work even when a popup
067a6b
menu is on screen. For instance, the keybinding for showing
067a6b
the app menu and the keyinding for showing the calendar are
067a6b
examples.
067a6b
067a6b
This is achieved by putting in place a special "POPUP" action
067a6b
mode, whenever a popup menu is active.  This mode replaces
067a6b
the (e.g., "NORMAL" or "OVERVIEW") action mode that was in place
067a6b
for as long as the popup menu is active.
067a6b
067a6b
But those keybindings should not work when the user is at the
067a6b
unlock dialog (which uses an action mode of "UNLOCK").
067a6b
067a6b
Unfortunately, since commit c79d24b6 they do.
067a6b
067a6b
This commit addresses the problem by forcing the action mode
067a6b
to NONE at the unlock screen when popups are visible.
067a6b
067a6b
CVE-2019-3820
067a6b
067a6b
Closes https://gitlab.gnome.org/GNOME/gnome-shell/issues/851
067a6b
---
067a6b
 js/gdm/authPrompt.js  | 3 ++-
067a6b
 js/gdm/loginDialog.js | 3 ++-
067a6b
 js/ui/shellEntry.js   | 6 ++++--
067a6b
 3 files changed, 8 insertions(+), 4 deletions(-)
067a6b
067a6b
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
067a6b
index 27a55246a..15d3273fa 100644
067a6b
--- a/js/gdm/authPrompt.js
067a6b
+++ b/js/gdm/authPrompt.js
067a6b
@@ -14,6 +14,7 @@ const Batch = imports.gdm.batch;
067a6b
 const GdmUtil = imports.gdm.util;
067a6b
 const Meta = imports.gi.Meta;
067a6b
 const Params = imports.misc.params;
067a6b
+const Shell = imports.gi.Shell;
067a6b
 const ShellEntry = imports.ui.shellEntry;
067a6b
 const Tweener = imports.ui.tweener;
067a6b
 const UserWidget = imports.ui.userWidget;
067a6b
@@ -110,7 +111,7 @@ var AuthPrompt = new Lang.Class({
067a6b
                          x_align: St.Align.START });
067a6b
         this._entry = new St.Entry({ style_class: 'login-dialog-prompt-entry',
067a6b
                                      can_focus: true });
067a6b
-        ShellEntry.addContextMenu(this._entry, { isPassword: true });
067a6b
+        ShellEntry.addContextMenu(this._entry, { isPassword: true, actionMode: Shell.ActionMode.NONE });
067a6b
 
067a6b
         this.actor.add(this._entry,
067a6b
                        { expand: true,
067a6b
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
067a6b
index 912c0e0ca..141ed9265 100644
067a6b
--- a/js/gdm/loginDialog.js
067a6b
+++ b/js/gdm/loginDialog.js
067a6b
@@ -338,7 +338,8 @@ var SessionMenuButton = new Lang.Class({
067a6b
                  this._button.remove_style_pseudo_class('active');
067a6b
         });
067a6b
 
067a6b
-        this._manager = new PopupMenu.PopupMenuManager({ actor: this._button });
067a6b
+        this._manager = new PopupMenu.PopupMenuManager({ actor: this._button },
067a6b
+                                                       { actionMode: Shell.ActionMode.NONE });
067a6b
         this._manager.addMenu(this._menu);
067a6b
 
067a6b
         this._button.connect('clicked', () => { this._menu.toggle(); });
067a6b
diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js
067a6b
index 72e2fc33b..6d46a0997 100644
067a6b
--- a/js/ui/shellEntry.js
067a6b
+++ b/js/ui/shellEntry.js
067a6b
@@ -10,6 +10,7 @@ const BoxPointer = imports.ui.boxpointer;
067a6b
 const Main = imports.ui.main;
067a6b
 const Params = imports.misc.params;
067a6b
 const PopupMenu = imports.ui.popupMenu;
067a6b
+const Shell = imports.gi.Shell;
067a6b
 
067a6b
 const LOCKDOWN_SCHEMA = 'org.gnome.desktop.lockdown';
067a6b
 const DISABLE_SHOW_PASSWORD_KEY = 'disable-show-password';
067a6b
@@ -171,11 +172,12 @@ function addContextMenu(entry, params) {
067a6b
     if (entry.menu)
067a6b
         return;
067a6b
 
067a6b
-    params = Params.parse (params, { isPassword: false });
067a6b
+    params = Params.parse (params, { isPassword: false, actionMode: Shell.ActionMode.POPUP });
067a6b
 
067a6b
     entry.menu = new EntryMenu(entry);
067a6b
     entry.menu.isPassword = params.isPassword;
067a6b
-    entry._menuManager = new PopupMenu.PopupMenuManager({ actor: entry });
067a6b
+    entry._menuManager = new PopupMenu.PopupMenuManager({ actor: entry },
067a6b
+                                                        { actionMode: params.actionMode });
067a6b
     entry._menuManager.addMenu(entry.menu);
067a6b
 
067a6b
     // Add an event handler to both the entry and its clutter_text; the former
067a6b
-- 
067a6b
2.23.0
067a6b