summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-extended/pam/libpam/pam.d/common-session2
-rw-r--r--meta/recipes-extended/pam/libpam_1.1.6.bb4
2 files changed, 4 insertions, 2 deletions
diff --git a/meta/recipes-extended/pam/libpam/pam.d/common-session b/meta/recipes-extended/pam/libpam/pam.d/common-session
index 7fd61feea1..a4a551f711 100644
--- a/meta/recipes-extended/pam/libpam/pam.d/common-session
+++ b/meta/recipes-extended/pam/libpam/pam.d/common-session
@@ -17,5 +17,3 @@ session requisite pam_deny.so
session required pam_permit.so
# and here are more per-package modules (the "Additional" block)
session required pam_unix.so
-# Register with logind to make screen/tmux/etc work
-session optional pam_systemd.so
diff --git a/meta/recipes-extended/pam/libpam_1.1.6.bb b/meta/recipes-extended/pam/libpam_1.1.6.bb
index 448a67b71b..f7493c595d 100644
--- a/meta/recipes-extended/pam/libpam_1.1.6.bb
+++ b/meta/recipes-extended/pam/libpam_1.1.6.bb
@@ -102,6 +102,10 @@ do_install() {
# The lsb requires unix_chkpwd has setuid permission
chmod 4755 ${D}${sbindir}/unix_chkpwd
+
+ if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ echo "session optional pam_systemd.so" >> ${D}${sysconfdir}/pam.d/common-session
+ fi
}
python do_pam_sanity () {