Package list policykit-1-gnome / d72b254
Use fresh X11 timestamps when displaying authentication dialog This circumvents focus-stealing prevention. Thanks to Jeffrey Knockel! Closes: #684300 Martin Pitt 3 years ago
2 changed file(s) with 36 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 From: Jeffrey Knockel <jeff250@gmail.com>
1 Date: Mon, 30 Apr 2018 18:05:20 +0000
2 Subject: Use fresh X11 timestamps when displaying authentication dialog
3
4 This circumvents focus-stealing prevention.
5
6 Bug: https://bugzilla.gnome.org/show_bug.cgi?id=676076
7 Bug-Debian: https://bugs.debian.org/684300
8 Bug-Ubuntu: https://launchpad.net/bugs/946171
9 ---
10 src/polkitgnomeauthenticator.c | 4 +++-
11 1 file changed, 3 insertions(+), 1 deletion(-)
12
13 diff --git a/src/polkitgnomeauthenticator.c b/src/polkitgnomeauthenticator.c
14 index 23163b4..e57d76e 100644
15 --- a/src/polkitgnomeauthenticator.c
16 +++ b/src/polkitgnomeauthenticator.c
17 @@ -26,6 +26,7 @@
18 #include <sys/types.h>
19 #include <pwd.h>
20 #include <glib/gi18n.h>
21 +#include <gdk/gdkx.h>
22
23 #include <polkit/polkit.h>
24 #include <polkitagent/polkitagent.h>
25 @@ -306,7 +307,8 @@ session_request (PolkitAgentSession *session,
26 }
27
28 gtk_widget_show_all (GTK_WIDGET (authenticator->dialog));
29 - gtk_window_present (GTK_WINDOW (authenticator->dialog));
30 + gtk_window_present_with_time (GTK_WINDOW (authenticator->dialog),
31 + gdk_x11_get_server_time (gtk_widget_get_window (GTK_WIDGET (authenticator->dialog))));
32 password = polkit_gnome_authentication_dialog_run_until_response_for_prompt (POLKIT_GNOME_AUTHENTICATION_DIALOG (authenticator->dialog),
33 modified_request,
34 echo_on,
00 0001-Select-the-current-user-to-authenticate-with-by-defa.patch
11 0002-Auth-dialog-Make-the-label-wrap-at-70-chars.patch
22 0003-Get-user-icon-from-accountsservice-instead-of-lookin.patch
3 0004-Use-fresh-X11-timestamps-when-displaying-authenticat.patch