|
|
13bb5b |
From e8d452420d80f34c767bffc98303c0769da54ed5 Mon Sep 17 00:00:00 2001
|
|
|
13bb5b |
From: Ray Strode <rstrode@redhat.com>
|
|
|
13bb5b |
Date: Tue, 7 Oct 2014 14:30:34 -0400
|
|
|
13bb5b |
Subject: [PATCH] gdm: fix sensitivity of auth prompt when cancelling early and
|
|
|
13bb5b |
user list is disabled
|
|
|
13bb5b |
|
|
|
13bb5b |
If the user list is disabled and the user clicks cancel quickly enough
|
|
|
13bb5b |
after typing their username, they can get in a state where the
|
|
|
13bb5b |
auth prompt gets stuck in the insensitive state.
|
|
|
13bb5b |
|
|
|
13bb5b |
This is because the login dialog code makes the prompt insensitive
|
|
|
13bb5b |
while while pam is processing the provided username, but the prompt
|
|
|
13bb5b |
only makes itself sensitive again when it is hidden.
|
|
|
13bb5b |
|
|
|
13bb5b |
This commit makes it sensitive right before asking for a username again.
|
|
|
13bb5b |
---
|
|
|
13bb5b |
js/gdm/loginDialog.js | 2 ++
|
|
|
13bb5b |
1 file changed, 2 insertions(+)
|
|
|
13bb5b |
|
|
|
13bb5b |
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
|
|
|
13bb5b |
index b4487e6..893ab31 100644
|
|
|
13bb5b |
--- a/js/gdm/loginDialog.js
|
|
|
13bb5b |
+++ b/js/gdm/loginDialog.js
|
|
|
13bb5b |
@@ -685,60 +685,62 @@ const LoginDialog = new Lang.Class({
|
|
|
13bb5b |
|
|
|
13bb5b |
// Translators: this message is shown below the username entry field
|
|
|
13bb5b |
// to clue the user in on how to login to the local network realm
|
|
|
13bb5b |
this._authPrompt.setMessage(_("(e.g., user or %s)").format(hint), GdmUtil.MessageType.HINT);
|
|
|
13bb5b |
},
|
|
|
13bb5b |
|
|
|
13bb5b |
_askForUsernameAndBeginVerification: function() {
|
|
|
13bb5b |
this._authPrompt.setPasswordChar('');
|
|
|
13bb5b |
this._authPrompt.setQuestion(_("Username: "));
|
|
|
13bb5b |
|
|
|
13bb5b |
let realmManager = new Realmd.Manager();
|
|
|
13bb5b |
let realmSignalId = realmManager.connect('login-format-changed',
|
|
|
13bb5b |
Lang.bind(this, this._showRealmLoginHint));
|
|
|
13bb5b |
this._showRealmLoginHint(realmManager.loginFormat);
|
|
|
13bb5b |
|
|
|
13bb5b |
let nextSignalId = this._authPrompt.connect('next',
|
|
|
13bb5b |
Lang.bind(this, function() {
|
|
|
13bb5b |
this._authPrompt.disconnect(nextSignalId);
|
|
|
13bb5b |
this._authPrompt.updateSensitivity(false);
|
|
|
13bb5b |
let answer = this._authPrompt.getAnswer();
|
|
|
13bb5b |
this._user = this._userManager.get_user(answer);
|
|
|
13bb5b |
this._authPrompt.clear();
|
|
|
13bb5b |
this._authPrompt.startSpinning();
|
|
|
13bb5b |
this._authPrompt.begin({ userName: answer });
|
|
|
13bb5b |
this._updateCancelButton();
|
|
|
13bb5b |
|
|
|
13bb5b |
realmManager.disconnect(realmSignalId)
|
|
|
13bb5b |
realmManager.release();
|
|
|
13bb5b |
}));
|
|
|
13bb5b |
this._updateCancelButton();
|
|
|
13bb5b |
+
|
|
|
13bb5b |
+ this._authPrompt.updateSensitivity(true);
|
|
|
13bb5b |
this._showPrompt();
|
|
|
13bb5b |
},
|
|
|
13bb5b |
|
|
|
13bb5b |
_startSession: function(serviceName) {
|
|
|
13bb5b |
Tweener.addTween(this.actor,
|
|
|
13bb5b |
{ opacity: 0,
|
|
|
13bb5b |
time: _FADE_ANIMATION_TIME,
|
|
|
13bb5b |
transition: 'easeOutQuad',
|
|
|
13bb5b |
onUpdate: function() {
|
|
|
13bb5b |
let children = Main.layoutManager.uiGroup.get_children();
|
|
|
13bb5b |
|
|
|
13bb5b |
for (let i = 0; i < children.length; i++) {
|
|
|
13bb5b |
if (children[i] != Main.layoutManager.screenShieldGroup)
|
|
|
13bb5b |
children[i].opacity = this.actor.opacity;
|
|
|
13bb5b |
}
|
|
|
13bb5b |
},
|
|
|
13bb5b |
onUpdateScope: this,
|
|
|
13bb5b |
onComplete: function() {
|
|
|
13bb5b |
Mainloop.idle_add(Lang.bind(this, function() {
|
|
|
13bb5b |
this._greeter.call_start_session_when_ready_sync(serviceName, true, null);
|
|
|
13bb5b |
return false;
|
|
|
13bb5b |
}));
|
|
|
13bb5b |
},
|
|
|
13bb5b |
onCompleteScope: this });
|
|
|
13bb5b |
},
|
|
|
13bb5b |
|
|
|
13bb5b |
_onSessionOpened: function(client, serviceName) {
|
|
|
13bb5b |
this._authPrompt.finish(Lang.bind(this, function() {
|
|
|
13bb5b |
this._startSession(serviceName);
|
|
|
13bb5b |
}));
|
|
|
13bb5b |
--
|
|
|
13bb5b |
1.8.3.1
|
|
|
13bb5b |
|