Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PolicyKit authentication and crashes on Ubuntu 22.04 #201

Open
polkit-github-migration-bot opened this issue Jul 31, 2023 · 5 comments
Open

Comments

@polkit-github-migration-bot
Copy link
Collaborator

In gitlab.freedesktop.org by wzh4464 on Jul 31, 2023, 05:29

Link to the original issue: https://gitlab.freedesktop.org/polkit/polkit/-/issues/200

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:

  • Reinstalling policykit-1 and dbus packages
  • Reviewing dbus configs in /etc/dbus-1/ and polkit configs in /etc/polkit-1/
  • Restarting dbus and polkit services

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!

@polkit-github-migration-bot
Copy link
Collaborator Author

In gitlab.freedesktop.org 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.)

@polkit-github-migration-bot
Copy link
Collaborator Author

In gitlab.freedesktop.org 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.

@polkit-github-migration-bot
Copy link
Collaborator Author

In gitlab.freedesktop.org by bluca on Aug 2, 2023, 21:39

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

@polkit-github-migration-bot
Copy link
Collaborator Author

In gitlab.freedesktop.org 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.

@polkit-github-migration-bot
Copy link
Collaborator Author

In gitlab.freedesktop.org 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

crocodile13 added a commit to crocodile13/lug-helper that referenced this issue Sep 22, 2024
Solution to the issue starcitizen-lug#72. It's not very clean since I didn't really understand the core of the problem and its resolution... it's an 'implementation' of polkit-org/polkit#201.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant