[oe-commits] Koen Kooi : openssh: enable PAM at runtime based on DISTRO_FEATURES
git at git.openembedded.org
git at git.openembedded.org
Mon Feb 24 16:14:35 UTC 2014
Module: openembedded-core.git
Branch: master-next
Commit: 08c523daec0f5161803d2a6704402490c18ff6ca
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=08c523daec0f5161803d2a6704402490c18ff6ca
Author: Koen Kooi <koen at dominion.thruhere.net>
Date: Thu Feb 20 08:07:22 2014 +0100
openssh: enable PAM at runtime based on DISTRO_FEATURES
Everything is setup to use PAM except for the server config. If 'pam' is
in DISTRO_FEATURES the configs will be changed to enable it.
Syslog will now show:
Feb 19 09:28:36 beast sshd[2980]: pam_unix(sshd:session): session opened for user koen by (uid=0)
And more importantly:
koen at beast:~$ loginctl
SESSION UID USER SEAT
c1 1000 koen seat0
c3 1000 koen seat0
c13 1000 koen
3 sessions listed.
Systemd now registers the session properly so it won't kill things like 'screen'
and 'tmux' when disconnecting the ssh session.
Signed-off-by: Koen Kooi <koen.kooi at linaro.org>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
---
meta/recipes-connectivity/openssh/openssh_6.4p1.bb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-connectivity/openssh/openssh_6.4p1.bb b/meta/recipes-connectivity/openssh/openssh_6.4p1.bb
index 9c0bb48..b5e84d4 100644
--- a/meta/recipes-connectivity/openssh/openssh_6.4p1.bb
+++ b/meta/recipes-connectivity/openssh/openssh_6.4p1.bb
@@ -80,8 +80,8 @@ do_compile_append () {
do_install_append () {
if [ "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" = "pam" ]; then
- install -d ${D}${sysconfdir}/pam.d
- install -m 0755 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd
+ install -D -m 0755 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd
+ sed -i -e 's:#UsePAM no:UsePAM yes:' ${WORKDIR}/sshd_config ${D}${sysconfdir}/ssh/sshd_config
fi
install -d ${D}${sysconfdir}/init.d
More information about the Openembedded-commits
mailing list