[systemd-devel] logind, su - sessions and initscripts compatibility

Andrei Borzenkov arvidjaar at gmail.com
Thu Dec 18 00:05:21 PST 2014


As far as I know, systemd still officially retains compatibility with
initscripts. Unfortunately, session management now at least partially
broke it.

Any initscript that is using "su -" would create logind session; this
session will persist until processes started by initscript are runing.

On shutdown logind is stopped early; it also tears down all user
sessions killing all processes in these sessions. So initscripts do
not even get chance to initiate clean termination of running services.

The only solution I can think of is to make pam_systemd skip session
based on some environment variable which would be set by sysvinit
generator. Would that be acceptable? Any other idea?

Details are e.g. here:
http://bugzilla.suse.com/show_bug.cgi?id=906900#c34. I now think this
explains several other similar cases reported in the past.

Thank you!


More information about the systemd-devel mailing list