Web lists-archives.com

Re: Debian Stretch SELinux enforcing causes systemd --user unit to fail




C J du Preez wrote:

Good day,

Hi,

I would like to report a bug, but I am not sure which package to report it against.

I have SELinux enabled and enforcing on Debian Stretch (commandline via SSH only, no GUI is installed at all). I am trying to start a systemd --user unit (which I know is correct, because it works without SELinux enabled). When I try to start the service (using systemctl --user start ssh-agent) I get:

Failed to connect to bus: No such file or directory.

With SELinux enabled, DBUS_SESSION_BUS_ADDRESS is undefined (with SELinux disabled it is defined as unix:path=/run/user/1000/bus). With SELinux disabled that path exists, with SELinux enabled, it does not.
Could you also please try in permissive mode as well? That should fix the creation of the file on disk, if that problem is fixed I think you could open a bug against the selinux-policy-default package.

Regarding the environment variable not being set, I think it's this bug[0]. Would you be able to rebuild systemd with this patch[1] applied? If that patch fixes the problem, we could maybe try to include that in a stable point release.

Otherwise, you should try to upgrade systemd to an higher version using the backports.

Kind regards,

Laurent Bigonville


[0] https://github.com/systemd/systemd/issues/6120
[1] https://github.com/systemd/systemd/pull/6201/commits/51c7d5aa36e9ac0ec8ca6fef811a5f9deb7e4fd2