Packages

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category Stable
  • Assigned To
    Emulatorman
    heckyel
  • Operating System Hyperbola GNU/Linux-libre
  • Severity High
  • Priority Medium
  • Reported Version Milky Way v0.2
  • Due in Version Starfix
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Packages
Opened by fablamar78 - 23/11/2017
Last edited by Emulatorman - 11/08/2018

FS#151 - [gparted] gparted_polkit doesn't work

Hello,

gparted_polkit doesn’t work, error message (polkit is installed on my system)

Error executing command as another user: No authentication agent found.

If using :

sudo gparted

or

gksu gparted

It works. By default with xfce, the gparted launcher uses gparted_polkit though.

Thanks for your help

Closed by  Emulatorman
11.08.2018 01:41
Reason for closing:  Fixed
Admin

Root privileges are required for running GParted since it is a tool capable of destroying partition tables and vast amount of data, only root may run it.

Admin

Seems you need a polkit authentication agent running such as lxpolkit, polkit-kde or polkit-gnome. There is a topic from Arch forums [0] where a member explains how to solve it. [1]

Hello André Silva,

Thanks. I followed the procedure and created an autostart service in xfce :

nano ~/.config/autostart/Polkit-Gnome.desktop

[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=Polkit-Gnome
Comment=
Exec=/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
OnlyShowIn=XFCE;
StartupNotify=false
Terminal=false
Hidden=false

but :

/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1

do not start.

Error message :

(polkit-gnome-authentication-agent-1:3120): polkit-gnome-1-WARNING : Unable to determine the session we are in: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.ConsoleKit was not provided by any .service files
consolekit** is missing in hyperbola repo

and :

https://www.parabola.nu/packages/pcr/x86_64/polkit-consolekit/

"PolyciKit with ConsoleKit support for non-systemd systems"

Admin

ConsoleKit is currently not actively maintained and will be removed from Hyperbola soon to follow the Hyperbola Packaging Guidelines (see 5th amendment about anti-abandonware). For that reason, we are using elogind , the systemd project's "logind", extracted out to be a standalone package. Therefore, our polkit authentication agents should be adapted to elogind instead of systemd-logind or ConsoleKit.

Possible solution of the problem:
1. Replace contents of /etc/pam.d/polkit-1 file with the following:

#%PAM-1.0

auth       include      system-auth
account    include      system-auth
password   include      system-auth
session    include      system-auth

2. Remount /proc with hidepid=0 option:
mount -o remount,hidepid=0 /proc

To permanently fix the problem, from package "polkit" debian patch called "01_pam_polkit.patch" have to be excluded.
From mkinitpcio, commit 5d87c2df4187d796f4cdcf65c3f9066f478b82bd have to be reverted, since it introduces hidepid=2 change. Polkit agents (like lxpolkit) require access to /proc/1/cgroup in order to properly initialize. hidepid=2 in turn hides /proc/1 from other users (except root).
If hidepid=2 is required, it is also possible to change elogind code to handle case, where access to /proc/1/cgroup is denied. Problematic code is located in src/basic/cgroup-util.c:cg_shift_path function. If cg_get_root_path fails, it also fails to determine session of polkit agent's process. In case of cg_get_root_path failure, you can speculate that PID's 1 session is located at "/".

Admin

Thank you for your suggestions Jack, i will follow those instructions to fix the issue.

Admin
If hidepid=2 is required, it is also possible to change elogind code to handle case, where access to /proc/1/cgroup is denied. Problematic code is located in src/basic/cgroup-util.c:cg_shift_path function. If cg_get_root_path fails, it also fails to determine session of polkit agent's process. In case of cg_get_root_path failure, you can speculate that PID's 1 session is located at "/".

Yes, hidepid=2 is required for privacy/security reasons, what's the way to speculate that PID's 1 session is located at "/" in the cg_shift_path function?

Patch for elogind attached.
It might be not the best solution, but works for me.

Admin
It might be not the best solution, but works for me.

Thank you again Jack, i've pushed a new revision of elogind with your patch included [0]

Date User Effort (H:M)
watch my effort tracking timers

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing