Package: systemd-shim
Version: 8-2

Fixed-upstream is invalid as this bug has recently had a number of
others merged into it.

I have spent a few days looking into this problem, and have had to start
from scratch to see what is going on.

I have been seeing what happens when you run 'pkcheck --list-temp',
which currently returns 'Error getting session: No session for pid <PID>'.

It looks like polkit has a hard dependency on systemd as init currently
- the 'session' being sought goes through
src/polkit/polkit/polkitunixsession-systemd.c:polkit_unix_session_initable_init,
which then calls into sd_pid_get_session from the libsystemd0 package.
This uses the PID of the pkcheck-calling process to read the proc file
'/proc/<pid>/cgroup' - it looks for a line containing 'systemd', and
then extracts the 'path', the bit at the end, to get at the session.

On my current session, every single process has '/' as this path - in
libsystemd0/systemd-215/src/shared/cgroup-util.c:cg_path_get_session
line 1320, this path is explicitly rejected - its checked for and
'-ENOENT' is returned.

Under a systemd-as-init system, a valid example of a path would be
'/user.slice/user-1000.slice/session-1.scope'.

So far I haven't seen logind factor in here. I can see that polkit used
to use ConsoleKit (I was originally expecting to be investigating
src/polkit/polkitunixsession.c rather than the systemd version), I hope
next session to turn back time a bit and see how this process worked
properly under ConsoleKit.

I know nothing about cgmanager yet BTW, I've been told it might be a bug
with this - will check into that later.

-- 
Libre software on Github: https://github.com/OmegaPhil
FSF member #9442

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to