Skip to content

Need a better way to check if polkit agent is running.

If the system uses @hidepid@ we won't find polkit in the process table.

 ivanalejandro0: no... what i mean is, is it required that the process is found in the process table at all?
 not that it is owned by root
 just that it exists there
 yes, we use this code to check if polkit is running https://github.com/leapcode/bitmask_client/blob/develop/src/leap/bitmask/services/eip/linuxvpnlauncher.py#L58
 we use 4 different `ps` to check for possible polkits
 but we need at least one of them running
 ivanalejandro0: ok, well, that is the problem then
 because I had this enabled: http://www.linux-dev.org/2012/09/hide-process-information-for-other-users/
 which may become default in debian (!)
 when I disabled that, it works
 you can try it easily, just add the hidepid=2 to your fstab and do # mount -oremount /proc
 and then do a ps auxww as an unprivileged user
 maybe there is a better way to find out if polkit is running, like calling some process, i dont know enough about it to know... but maybe ck-list-sessions or something?

(from redmine: created on 2014-05-07, relates #4144 (closed))