diff options
Diffstat (limited to 'strata/foundation/systemd.morph')
-rw-r--r-- | strata/foundation/systemd.morph | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/strata/foundation/systemd.morph b/strata/foundation/systemd.morph index 81db9acd..5dc48e70 100644 --- a/strata/foundation/systemd.morph +++ b/strata/foundation/systemd.morph @@ -1,11 +1,23 @@ name: systemd kind: chunk build-system: autotools +pre-configure-commands: +# systemd prematurely kills the user session. This is a known bug in systemd +# https://bugs.freedesktop.org/show_bug.cgi?id=70593 +- | + cat >> units/user@.service.m4.in <<EOF + KillSignal=SIGCONT + ExecStop=/bin/kill -TERM \$MAINPID + EOF configure-commands: - sh autogen.sh -- ./configure --prefix="$PREFIX" --enable-xz --disable-manpages --sysconfdir=/etc - --localstatedir=/var --libdir="$PREFIX/lib" --libexecdir="$PREFIX/libexec" --with-rootprefix= - --with-rootlibdir=/lib +# KILL added because it picks up /usr/bin/kill, which is not installed on +# all systems +- | + KILL=/bin/kill ./configure --prefix="$PREFIX" --enable-xz --disable-manpages \ + --disable-tests --sysconfdir=/etc --localstatedir=/var \ + --libdir="$PREFIX/lib" --libexecdir="$PREFIX/libexec" \ + --with-rootprefix= --with-rootlibdir=/lib install-commands: - make DESTDIR="$DESTDIR" install - mkdir -p "$DESTDIR"/sbin @@ -25,3 +37,10 @@ post-install-commands: [Network] DHCP=yes EOF +# Use the pam config systemd provides +- cp -a "$DESTDIR/$PREFIX"/share/factory/etc/pam.d/* "$DESTDIR/etc/pam.d" + +# Add pam_deny.so to the default systemd-auth pam.d config file. Without +# it, if shadow is configured to use PAM, it would be possible to login +# to a system with the wrong password. +- echo 'auth requisite pam_deny.so' >> "$DESTDIR"/etc/pam.d/system-auth |