polkit-org / polkit

polkit (formerly PolicyKit) is a toolkit for defining and handling authorizations. It is used for allowing unprivileged processes to speak to privileged processes.
Other
41 stars 22 forks source link

PIDFID breaks pkexec with ConsoleKit session tracking #451

Open 0strodamus opened 2 months ago

0strodamus commented 2 months ago

Compiling polkit 124 with ConsoleKit 1.26 and polkit option session_tracking=ConsoleKit breaks launching any application with pkexec. The following error is generated on the command line:

Error checking for authorization org.freedesktop.policykit.exec: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: Process not found.

Reverting the PIDFID commits starting with polkitd: use PIDFDs if available to track processes and related subsequent commits fixes the issue.

Also commenting or removing the HAVE_PIDFD_OPEN line from meson.build will fix the issue.

Does this functionality require elogind or systemd? Can an option be added to meson_options.txt to toggle HAVE_PIDFD_OPEN off for systems that it isn't going to work on?