[systemd-devel] [PATCH weston] doc/systemd: system service example
lennart at poettering.net
Wed Nov 29 18:05:07 UTC 2017
On Di, 28.11.17 12:14, Pekka Paalanen (ppaalanen at gmail.com) wrote:
> +Description=Weston, a Wayland compositor, as a system service
> +Documentation=man:weston(1) man:weston.ini(5)
> +# Make sure we are started after logins are permitted.
> +# If Plymouth is used, we want to start when it is on its way out.
> +# D-Bus is necessary for contacting logind. Logind is required.
> +# This scope is created by pam_systemd when logging in as the user.
> +# This directive is a workaround to a systemd bug, where the setup of the
> +# user session by PAM has some race condition, possibly leading to a failure.
> +# See README for more details.
Hmm, what is this about?
This is racy, as the session ID is not really reliably predictable,
and is synthesized in different contexts in different ways, for
example depnding on whether audit is enabled in the kernel it might be
session-1.scope rather than session-c1.scope.
> +# Set up a full user session for the user, required by Weston.
Piggy-backing on "login" is a bad idea. "login" is a text tool, and
thus the PAM rules for it usually pull in some TTY specific PAM
modules. YOu shoudl really use your own PAM fragment here, and
configure only the bits you need.
Lennart Poettering, Red Hat
More information about the wayland-devel