[systemd-devel] [PATCH 1/2] core: Refuse to run a user instance when the system hasn't been booted with systemd.
Michael Biebl
mbiebl at gmail.com
Tue Oct 16 06:35:00 PDT 2012
2012/10/16 Lennart Poettering <lennart at poettering.net>:
> Now, Thomas' patch actually changes much less than people might
> think. This is because sd_booted() simply checks whether
> /sys/fs/cgroup/systemd is mounted. But to run --user on a foreign system
> you need to set that tree up anyway, as that is a requirement for
> systemd either way.
So, if you have non-systemd init + systemd --user, sd_booted() will
return true, even if the system has not been booted with systemd.
This could lead to very interesting/unexpected results, like system
software misbehaving (e.g. rsyslog checks for sd_booted()), or in
Debian we use the [ -d /sys/fs/cgroup/systemd ] check at several
places to check whether we have booted with systemd.
I'm wondering if it would be possible / make sense to use a separate
sysfs tree for users session in such a case, like
/sys/fs/cgroup/systemd-user
Michael
--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
More information about the systemd-devel
mailing list