FS#70670 - [polkit-gnome] 0.105-6 crashes under Wayland

Attached to Project: Community Packages
Opened by kinodont (kinodont) - Saturday, 01 May 2021, 10:50 GMT
Last edited by Balló György (City-busz) - Saturday, 01 May 2021, 18:54 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Balló György (City-busz)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Patch "Use fresh X11 timestamps when displaying authentication dialog" is using gdk_x11_get_server_time without any fallback for Wayland.

Steps to reproduce:
1. start a Wayland compositor (e.g. Weston)
$ weston

2. register the authentication agent
$ /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &

3. use the agent, e.g.:
$ pkexec bash

4. crash (segfault)

I've attached a patch with a possible fix.
This task depends upon

Closed by  Balló György (City-busz)
Saturday, 01 May 2021, 18:54 GMT
Reason for closing:  Fixed
Additional comments about closing:  polkit-gnome 0.105-8
Comment by Balló György (City-busz) - Saturday, 01 May 2021, 12:20 GMT
Please test polkit-gnome 0.105-7 from [community-testing].
Comment by kinodont (kinodont) - Saturday, 01 May 2021, 17:27 GMT
I tested it - no crashes on Wayland (Weston, Sway). On Xfce4 and Cinnamon, there were no problems either.
However, there was an issue in Cinnamon fallback mode (metacity --replace & gnome-panel --replace &) where the dialog was focused only after the first `pkexec bash`, subsequent dialogs were always unfocused (the terminal kept the focus). This was not the case with polkit-gnome 0.105-6. It seems the patch that circumvents focus-stealing prevention was effectively reverted in polkit-gnome 0.105-7.
Comment by Balló György (City-busz) - Saturday, 01 May 2021, 17:58 GMT
Oh, I see. I hoped that gtk_get_current_event_time() could working, but it seems not.

I modified the patch based on your proposal. Please test polkit-gnome 0.105-8 from [community-testing]. I hope that it works properly now both for Metacity and Wayland.
Comment by kinodont (kinodont) - Saturday, 01 May 2021, 18:38 GMT
Yes, now it appears to work correctly everywhere. Thank you for the patch.
Comment by Balló György (City-busz) - Saturday, 01 May 2021, 18:54 GMT
Good to hear it's working. :)

Loading...