Accepting request 208896 from home:dimstar:bnc849913

- Add gnome-shell-hidepassword.patch: authPrompt: propagate gdm
  "reset" signal after user switching. Fixed GDM showing showing
  passwords on user switching (bnc#852490, bgo#710456).
- Add gnome-shell-extensions-disabling.patch: catch more errors on
  extensions enable() and disable(). Fixes gnome-shell extensions
  disabled on screen unlock (bnc#852527, bgo#688331, bgo#719378).
- Add gnome-shell-tray-reentrant.patch: messageTray: Prevent
  reentrancy issues in _updateState (bgo#711694).

OBS-URL: https://build.opensuse.org/request/show/208896
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-shell?expand=0&rev=196
This commit is contained in:
Dominique Leuenberger 2013-11-30 16:34:10 +00:00 committed by Git OBS Bridge
parent 577bc16e7c
commit 5fd6be7a5a
5 changed files with 304 additions and 0 deletions

View File

@ -0,0 +1,157 @@
From 2c538d247b4bec36ff921ec057572da2487cd9e4 Mon Sep 17 00:00:00 2001
From: Sebastien Lafargue <slaf66@gmail.com>
Date: Fri, 25 Oct 2013 13:28:11 +0000
Subject: catch more errors on extensions enable() and disable()
https://bugzilla.gnome.org/show_bug.cgi?id=688331
---
diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js
index a929451..dde7b82 100644
--- a/js/ui/extensionSystem.js
+++ b/js/ui/extensionSystem.js
@@ -76,7 +76,11 @@ function disableExtension(uuid) {
theme.unload_stylesheet(extension.stylesheet.get_path());
}
- extension.stateObj.disable();
+ try {
+ extension.stateObj.disable();
+ } catch(e) {
+ logExtensionError(uuid, e);
+ }
for (let i = 0; i < order.length; i++) {
let uuid = order[i];
@@ -89,8 +93,10 @@ function disableExtension(uuid) {
extensionOrder.splice(orderIdx, 1);
- extension.state = ExtensionState.DISABLED;
- _signals.emit('extension-state-changed', extension);
+ if ( extension.state != ExtensionState.ERROR ) {
+ extension.state = ExtensionState.DISABLED;
+ _signals.emit('extension-state-changed', extension);
+ }
}
function enableExtension(uuid) {
@@ -117,10 +123,15 @@ function enableExtension(uuid) {
}
}
- extension.stateObj.enable();
-
- extension.state = ExtensionState.ENABLED;
- _signals.emit('extension-state-changed', extension);
+ try {
+ extension.stateObj.enable();
+ extension.state = ExtensionState.ENABLED;
+ _signals.emit('extension-state-changed', extension);
+ return;
+ } catch(e) {
+ logExtensionError(uuid, e);
+ return;
+ }
}
function logExtensionError(uuid, error) {
@@ -150,7 +161,8 @@ function loadExtension(extension) {
} else {
let enabled = enabledExtensions.indexOf(extension.uuid) != -1;
if (enabled) {
- initExtension(extension.uuid);
+ if (!initExtension(extension.uuid))
+ return;
if (extension.state == ExtensionState.DISABLED)
enableExtension(extension.uuid);
} else {
@@ -205,7 +217,12 @@ function initExtension(uuid) {
extensionModule = extension.imports.extension;
if (extensionModule.init) {
- extensionState = extensionModule.init(extension);
+ try {
+ extensionState = extensionModule.init(extension);
+ } catch(e) {
+ logExtensionError(uuid, e);
+ return false;
+ }
}
if (!extensionState)
@@ -214,6 +231,7 @@ function initExtension(uuid) {
extension.state = ExtensionState.DISABLED;
_signals.emit('extension-loaded', uuid);
+ return true;
}
function getEnabledExtensions() {
@@ -235,11 +253,7 @@ function onEnabledExtensionsChanged() {
newEnabledExtensions.filter(function(uuid) {
return enabledExtensions.indexOf(uuid) == -1;
}).forEach(function(uuid) {
- try {
enableExtension(uuid);
- } catch(e) {
- logExtensionError(uuid, e);
- }
});
// Find and disable all the newly disabled extensions: UUIDs found in the
@@ -247,11 +261,7 @@ function onEnabledExtensionsChanged() {
enabledExtensions.filter(function(item) {
return newEnabledExtensions.indexOf(item) == -1;
}).forEach(function(uuid) {
- try {
disableExtension(uuid);
- } catch(e) {
- logExtensionError(uuid, e);
- }
});
enabledExtensions = newEnabledExtensions;
@@ -263,11 +273,7 @@ function _loadExtensions() {
let finder = new ExtensionUtils.ExtensionFinder();
finder.connect('extension-found', function(signals, extension) {
- try {
- loadExtension(extension);
- } catch(e) {
- logExtensionError(extension.uuid, e);
- }
+ loadExtension(extension);
});
finder.scanExtensions();
}
--
cgit v0.9.2
From 621e3d0df8abbf9c74df9f9c0cff3010bba5be82 Mon Sep 17 00:00:00 2001
From: Florian Mü <fmuellner@gnome.org>
Date: Tue, 26 Nov 2013 19:52:24 +0000
Subject: loginDialog: Implement cancel()
The screen shield expects a cancel() method on the unlockDialog
implementation, but LoginDialog does not provide it currently.
https://bugzilla.gnome.org/show_bug.cgi?id=719378
---
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index eb94554..fb3cf70 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -907,6 +907,10 @@ const LoginDialog = new Lang.Class({
Main.ctrlAltTabManager.removeGroup(this.dialogLayout);
},
+ cancel: function() {
+ this._authPrompt.cancel();
+ },
+
addCharacter: function(unichar) {
this._authPrompt.addCharacter(unichar);
},
--
cgit v0.9.2

View File

@ -0,0 +1,85 @@
From b2f547e93452cb2d406263cd9bb8743760c28683 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Mon, 25 Nov 2013 22:30:53 -0500
Subject: [PATCH] authPrompt: propagate gdm "reset" signal after user switching
After a user types in their password at the login screen, one
of two things can happen
1) a new session is started
2) an existing session is switched to
In the latter case, GDM sends a reset signal to the login screen,
so it knows to go back to the user list and wait to be summoned
again.
Unfortunately, all reset signals are ignored after verification
success. The reason is because the reset handler was copied from
the unlock dialog as part of a deduplication effort in commit
7e7295f259febf34c89659a9bcb05f9924fa1976 and the unlock dialog
handler at the time also emitted a "failed" signal on reset
(which wouldn't make sense to emit after success).
These days "failed" is handled in a different way.
This commit changes the code to let reset signals through after
successful verification.
https://bugzilla.gnome.org/show_bug.cgi?id=710456
---
js/gdm/authPrompt.js | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
index 1880e36..996b363 100644
--- a/js/gdm/authPrompt.js
+++ b/js/gdm/authPrompt.js
@@ -246,44 +246,42 @@ const AuthPrompt = new Lang.Class({
_onShowMessage: function(userVerifier, message, type) {
this.setMessage(message, type);
this.emit('prompted');
},
_onVerificationFailed: function() {
this._queryingService = null;
this.clear();
this.updateSensitivity(true);
this.setActorInDefaultButtonWell(null);
this.verificationStatus = AuthPromptStatus.VERIFICATION_FAILED;
},
_onVerificationComplete: function() {
this.verificationStatus = AuthPromptStatus.VERIFICATION_SUCCEEDED;
},
_onReset: function() {
- if (this.verificationStatus != AuthPromptStatus.VERIFICATION_SUCCEEDED) {
- this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
- this.reset();
- }
+ this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
+ this.reset();
},
addActorToDefaultButtonWell: function(actor) {
this._defaultButtonWell.add_child(actor);
},
setActorInDefaultButtonWell: function(actor, animate) {
if (!this._defaultButtonWellActor &&
!actor)
return;
let oldActor = this._defaultButtonWellActor;
if (oldActor)
Tweener.removeTweens(oldActor);
let isSpinner;
if (actor == this._spinner.actor)
isSpinner = true;
else
--
1.8.3.1

View File

@ -0,0 +1,41 @@
From 43f67399a3964d5204021f1571bf918d2ffe9f89 Mon Sep 17 00:00:00 2001
From: Jasper St. Pierre <jstpierre@mecheye.net>
Date: Fri, 15 Nov 2013 15:34:04 +0000
Subject: messageTray: Prevent reentrancy issues in _updateState
The methods we call in _updateState may not be reentrant, so make
sure that we never get into a situation where _updateState, through
some crazy chain of events, calls itself.
https://bugzilla.gnome.org/show_bug.cgi?id=711694
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index c66c9f6..7a8403c 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -2392,6 +2392,13 @@ const MessageTray = new Lang.Class({
// _updateState() figures out what (if anything) needs to be done
// at the present time.
_updateState: function() {
+ // If our state changes caused _updateState to be called,
+ // just exit now to prevent reentrancy issues.
+ if (this._updatingState)
+ return;
+
+ this._updatingState = true;
+
// Filter out acknowledged notifications.
this._notificationQueue = this._notificationQueue.filter(function(n) {
return !n.acknowledged;
@@ -2474,6 +2481,8 @@ const MessageTray = new Lang.Class({
} else if (desktopCloneIsVisible && !desktopCloneShouldBeVisible) {
this._hideDesktopClone();
}
+
+ this._updatingState = false;
},
_tween: function(actor, statevar, value, params) {
--
cgit v0.9.2

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Wed Nov 27 20:31:34 UTC 2013 - dimstar@opensuse.org
- Add gnome-shell-hidepassword.patch: authPrompt: propagate gdm
"reset" signal after user switching. Fixed GDM showing showing
passwords on user switching (bnc#852490, bgo#710456).
- Add gnome-shell-extensions-disabling.patch: catch more errors on
extensions enable() and disable(). Fixes gnome-shell extensions
disabled on screen unlock (bnc#852527, bgo#688331, bgo#719378).
- Add gnome-shell-tray-reentrant.patch: messageTray: Prevent
reentrancy issues in _updateState (bgo#711694).
-------------------------------------------------------------------
Fri Nov 15 13:41:44 UTC 2013 - dimstar@opensuse.org

View File

@ -26,6 +26,12 @@ Url: http://live.gnome.org/GnomeShell
Source: http://download.gnome.org/sources/gnome-shell/3.10/%{name}-%{version}.tar.xz
# PATCH-FIX-UPSTREAM gnome-shell-private-connection.patch bnc#751211 bgo#646187 dimstar@opensuse.org -- create private connections if the user is not authorized
Patch1: gnome-shell-private-connection.patch
# PATCH-FIX-UPSTREAM gnome-shell-hidepassword.patch bnc#852490 bgo#710456 dimstar@opensuse.org -- authPrompt: propagate gdm "reset" signal after user switching
Patch2: gnome-shell-hidepassword.patch
# PATCH-FIX-UPSTREAM gnome-shell-extensions-disabling.patch bnc#852527 bgo#688331 dimstar@opensuse.org -- Fix gnome-shell extensions disabled on screen unlock
Patch3: gnome-shell-extensions-disabling.patch
# PATCH-FIX-UPSTREAM gnome-shell-tray-reentrant.patch bgo#711694 dimstar@opensuse.org -- messageTray: Prevent reentrancy issues in _updateState
Patch4: gnome-shell-tray-reentrant.patch
BuildRequires: docbook-xsl-stylesheets
BuildRequires: intltool
BuildRequires: translation-update-upstream
@ -135,6 +141,9 @@ to enable, disable and install them.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
translation-update-upstream
%build