From fbbc2d49c860857b2fe4b2a6cdb967b0867261c9 Mon Sep 17 00:00:00 2001 From: Mikle KOlyada Date: Sat, 30 Jan 2021 22:50:12 +0300 Subject: systemd-auth: add systemd-homed support Signed-off-by: Mikle KOlyada Closes: https://github.com/gentoo/pambase/pull/5 Signed-off-by: Sam James --- templates/system-auth.tpl | 18 ++++++++++++++++-- templates/system-session.tpl | 4 ++++ 2 files changed, 20 insertions(+), 2 deletions(-) (limited to 'templates') diff --git a/templates/system-auth.tpl b/templates/system-auth.tpl index 01a29db..1adee05 100644 --- a/templates/system-auth.tpl +++ b/templates/system-auth.tpl @@ -8,16 +8,26 @@ auth [success=3 default=ignore] pam_krb5.so {{ krb5_params }} {% endif %} auth requisite pam_faillock.so preauth -auth [success=1 default=ignore] pam_unix.so {{ nullok|default('', true) }} {{ debug|default('', true) }} try_first_pass +{% if homed %} +auth [success=2 default=ignore] pam_unix.so {{ nullok|default('', true) }} {{ debug|default('', true) }} try_first_pass +auth [success=1 default=ignore] pam_systemd_home.so +{% else %} +auth [success=1 default=ignore] pam_unix.so {{ nullok|default('', true) }} {{ debug|default('', true) }} try_first_pas +{% endif %} auth [default=die] pam_faillock.so authfail {% if caps %} --auth optional pam_cap.so +auth optional pam_cap.so {% endif %} {% if krb5 %} account [success=2 default=ignore] pam_krb5.so {{ krb5_params }} {% endif %} + +{% if homed %} +account [success=1 default=ignore] pam_systemd_home.so +{% endif %} + account required pam_unix.so {{ debug|default('', true) }} account required pam_faillock.so @@ -37,6 +47,10 @@ password required pam_pwhistory.so use_authtok remember=5 retry=3 password [success=1 default=ignore] pam_krb5.so {{ krb5_params }} {% endif %} +{% if homed %} +password [success=1 default=ignore] pam_systemd_home.so +{% endif %} + {% if passwdqc or pwquality %} password required pam_unix.so try_first_pass {{ unix_authtok|default('', true) }} {{ nullok|default('', true) }} {{ unix_extended_encryption|default('', true) }} {{ debug|default('', true) }} {% else %} diff --git a/templates/system-session.tpl b/templates/system-session.tpl index 2a7024b..536db49 100644 --- a/templates/system-session.tpl +++ b/templates/system-session.tpl @@ -8,4 +8,8 @@ session optional pam_mktemp.so session [success=1 default=ignore] pam_krb5.so {{ krb5_params }} {% endif %} +{% if homed %} +session [success=1 default=ignore] pam_systemd_home.so +{% endif %} + session required pam_unix.so {{ debug|default('', true) }} -- cgit v1.2.3-65-gdbad