Allow disabling showing password on login/unlock screens
Resolves: https://issues.redhat.com/browse/RHEL-123139
This commit is contained in:
parent
98a51bfc2f
commit
83432be2af
116
0001-authPrompt-Connect-disable-show-password-key-with-pa.patch
Normal file
116
0001-authPrompt-Connect-disable-show-password-key-with-pa.patch
Normal file
@ -0,0 +1,116 @@
|
||||
From 1db8edbaf877a9ba8b972bd64871767866b3c9af Mon Sep 17 00:00:00 2001
|
||||
From: Joan Torres Lopez <joantolo@redhat.com>
|
||||
Date: Wed, 22 Oct 2025 13:32:15 +0200
|
||||
Subject: [PATCH 1/2] authPrompt: Connect disable-show-password key with
|
||||
password entry
|
||||
|
||||
---
|
||||
js/gdm/authPrompt.js | 15 ++++++++++++++-
|
||||
1 file changed, 14 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
|
||||
index e961f39..b6a323f 100644
|
||||
--- a/js/gdm/authPrompt.js
|
||||
+++ b/js/gdm/authPrompt.js
|
||||
@@ -1,7 +1,7 @@
|
||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
/* exported AuthPrompt */
|
||||
|
||||
-const { Clutter, GLib, GObject, Meta, Pango, Shell, St } = imports.gi;
|
||||
+const { Clutter, Gio, GLib, GObject, Meta, Pango, Shell, St } = imports.gi;
|
||||
|
||||
const Animation = imports.ui.animation;
|
||||
const AuthList = imports.gdm.authList;
|
||||
@@ -20,6 +20,9 @@ var DEFAULT_BUTTON_WELL_ANIMATION_TIME = 300;
|
||||
|
||||
var MESSAGE_FADE_OUT_ANIMATION_TIME = 500;
|
||||
|
||||
+const LOCKDOWN_SCHEMA = 'org.gnome.desktop.lockdown';
|
||||
+const DISABLE_SHOW_PASSWORD_KEY = 'disable-show-password';
|
||||
+
|
||||
var AuthPromptMode = {
|
||||
UNLOCK_ONLY: 0,
|
||||
UNLOCK_OR_LOG_IN: 1,
|
||||
@@ -198,6 +201,11 @@ var AuthPrompt = GObject.registerClass({
|
||||
this._mainBox.add_child(this._entry);
|
||||
this._entry.grab_key_focus();
|
||||
|
||||
+ this._lockdownSettings = new Gio.Settings({ schema_id: LOCKDOWN_SCHEMA });
|
||||
+ this._lockdownSettings.connect(`changed::${DISABLE_SHOW_PASSWORD_KEY}`,
|
||||
+ this._updateShowPasswordIcon.bind(this));
|
||||
+ this._updateShowPasswordIcon();
|
||||
+
|
||||
this._timedLoginIndicator = new St.Bin({
|
||||
style_class: 'login-dialog-timed-login-indicator',
|
||||
scale_x: 0,
|
||||
@@ -233,6 +241,11 @@ var AuthPrompt = GObject.registerClass({
|
||||
this._defaultButtonWell.add_child(this._spinner);
|
||||
}
|
||||
|
||||
+ _updateShowPasswordIcon() {
|
||||
+ let disableShowPassword = this._lockdownSettings.get_boolean(DISABLE_SHOW_PASSWORD_KEY);
|
||||
+ this._passwordEntry.set_show_peek_icon(!disableShowPassword);
|
||||
+ }
|
||||
+
|
||||
showTimedLoginIndicator(time) {
|
||||
let hold = new Batch.Hold();
|
||||
|
||||
--
|
||||
2.51.0
|
||||
|
||||
|
||||
From e308153f0d3cef060d38ffba0d781c4a53c6921a Mon Sep 17 00:00:00 2001
|
||||
From: Joan Torres Lopez <joantolo@redhat.com>
|
||||
Date: Wed, 22 Oct 2025 13:42:01 +0200
|
||||
Subject: [PATCH 2/2] unlockDialog: Do not reset the auth prompt on every tap
|
||||
|
||||
Currently we have a tap event tracker that causes that every time a tap
|
||||
happens in the lock screen, we reset the auth prompt and this can be
|
||||
particularly annoying at least in three cases:
|
||||
1. Just clicking everywhere in the screen may lead the unlock entry
|
||||
content to be cleared
|
||||
2. Clicking in the screen while an authentication is in progress,
|
||||
cancels it
|
||||
3. This may break a multi-factor authentication method, as a single
|
||||
click may lead previous steps to be cancelled
|
||||
|
||||
So, while resetting the auth prompt is important when we're about to
|
||||
show it, it's not something we want to do while an authentication has
|
||||
started.
|
||||
|
||||
As per this also do not touch the auth prompt sensitivity unless we're
|
||||
in an idle phase, or we may end up overriding the auth prompt state,
|
||||
leading for example to a text entry being editable while we're verifying
|
||||
the secret
|
||||
|
||||
Fixes: 37e55df29865dac13656116efdd7abec8056dea9
|
||||
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3852>
|
||||
---
|
||||
js/ui/unlockDialog.js | 11 +++++++++--
|
||||
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js
|
||||
index 00e3eef..169043b 100644
|
||||
--- a/js/ui/unlockDialog.js
|
||||
+++ b/js/ui/unlockDialog.js
|
||||
@@ -698,8 +698,15 @@ var UnlockDialog = GObject.registerClass({
|
||||
this._promptBox.add_child(this._authPrompt);
|
||||
}
|
||||
|
||||
- this._authPrompt.reset();
|
||||
- this._authPrompt.updateSensitivity(true);
|
||||
+ const {verificationStatus} = this._authPrompt;
|
||||
+ switch (verificationStatus) {
|
||||
+ case AuthPrompt.AuthPromptStatus.NOT_VERIFYING:
|
||||
+ case AuthPrompt.AuthPromptStatus.VERIFICATION_CANCELLED:
|
||||
+ case AuthPrompt.AuthPromptStatus.VERIFICATION_FAILED:
|
||||
+ this._authPrompt.reset();
|
||||
+ this._authPrompt.updateSensitivity(
|
||||
+ verificationStatus === AuthPrompt.AuthPromptStatus.NOT_VERIFYING);
|
||||
+ }
|
||||
}
|
||||
|
||||
_maybeDestroyAuthPrompt() {
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
Name: gnome-shell
|
||||
Version: 40.10
|
||||
Release: 28%{?dist}
|
||||
Release: 29%{?dist}
|
||||
Summary: Window management and application launching for GNOME
|
||||
|
||||
License: GPLv2+
|
||||
@ -36,6 +36,7 @@ Patch17: fix-resetting-auth-prompt.patch
|
||||
Patch18: 0001-authPrompt-Disregard-smartcard-status-changes-events.patch
|
||||
Patch19: 0001-loginDialog-Show-session-menu-button-when-in-IN_PROG.patch
|
||||
Patch20: 0001-systemActions-Optionally-allow-restart-shutdown-on-l.patch
|
||||
Patch21: 0001-authPrompt-Connect-disable-show-password-key-with-pa.patch
|
||||
|
||||
# Misc.
|
||||
Patch30: 0001-panel-add-an-icon-to-the-ActivitiesButton.patch
|
||||
@ -304,6 +305,10 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/evolution-calendar.de
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Oct 21 2025 Joan Torres <joantolo@redhat.com> - 40.10-29
|
||||
- Allow disabling showing password on login/unlock screens
|
||||
Resolves: RHEL-123139
|
||||
|
||||
* Wed Jul 16 2025 Joan Torres <joantolo@redhat.com> - 40.10-28
|
||||
- Allow restart/shutdown on lock screen
|
||||
Resolves: RHEL-103984
|
||||
|
||||
Loading…
Reference in New Issue
Block a user