vmihalko / t2_polkit

Other
0 stars 0 forks source link

PolicyKit authentication and crashes on Ubuntu 22.04 #204

Open vmihalko opened 11 months ago

vmihalko commented 11 months ago

In GitLab by @wzh4464 on Jul 31, 2023, 05:29

Current behaviour, description of the problem

When I give: pkexec reboot, it gives

Error checking for authorization org.freedesktop.policykit.exec: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying

Desired behaviour

It should prompt a password input.

Reproducer

pkexec reboot

Detailed description

[Version of polkit]: Package: policykit-1 Version: 0.105-33 [Version of OS]: Ubuntu 22.04 [Anything else related to the issue]:

I am running Ubuntu 22.04 with Cinnamon desktop and am having issues with PolicyKit authentication as well as crashes of the polkit service.

When running pkexec commands like pkexec nemo, I get the following D-Bus error:

Error checking for authorization org.nemo.root: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replying

This points to some problem with PolicyKit communicating over dbus.

Additionally, the polkit service itself seems to be crashing frequently with a segmentation fault:

Jul 31 09:40:47 zihanwu7-Precision-3630-Tower kernel: polkitd[8052]: segfault at 8 ip 000055e8cc4664a6 sp 00007fffdde2e910 error 4 in polkitd[55e8cc463000+f000]

Some troubleshooting steps I have tried:

The issues persist even after reinstalling packages and restarting services.

Please advise on any further troubleshooting steps or potential solutions. Let me know if any additional logs or details are required.

I am using a fresh install of Ubuntu 22.04 fully updated. This is not a new problem and has persisted across reboots and package reinstalls.

Appreciate any help on resolving these PolicyKit and dbus issues!

vmihalko commented 11 months ago

In GitLab by @smcv on Jul 31, 2023, 19:50

Ubuntu 22.04 has an ancient version of polkit (0.105) with a lot of bug fixes backported into it, so probably it is missing some necessary backported bug fix. I would recommend reporting this to Ubuntu instead of here.

Ubuntu 23.10 will be the first Ubuntu release to catch up with modern versions of polkit.

(Meanwhile in Debian, Debian 11 and older had approximately the same ancient version as Ubuntu, and Debian 12 was the first Debian release to catch up with modern versions.)

vmihalko commented 11 months ago

In GitLab by @jrybar on Aug 2, 2023, 14:18

Hmm... The new unit hardening introduced a need to make some SELinux context changes. If you're running SELinux, try turning it to Permissive mode.
Maybe this is something we should have documented better and announced in the release mail.

vmihalko commented 11 months ago

In GitLab by @bluca on Aug 2, 2023, 21:39

That's not related to this issue though? Ubuntu 22.04 will not get that change

vmihalko commented 11 months ago

In GitLab by @jrybar on Aug 3, 2023, 10:23

Not familiar with ubuntu and its archaic version of polkit. Just a blind shot concerning the current issues.

vmihalko commented 11 months ago

In GitLab by @bluca on Aug 3, 2023, 11:12

Yeah, as Simon said this is something that should be reported to Canonical, not upstream, as the versions are just too different