summaryrefslogtreecommitdiffstats
path: root/package/openssh
diff options
context:
space:
mode:
authorMatt Weber <matthew.weber@rockwellcollins.com>2015-07-14 15:20:22 -0500
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-07-18 17:26:07 +0200
commitf5f5bd92df7708d19ac19a9df922739520c707ee (patch)
treeec8a7405b33597ed84f9c6518a1a9770802fb1b4 /package/openssh
parent53bf4f72ebab7df29f53d8fd684ff3b61a6c93f4 (diff)
downloadbuildroot-f5f5bd92df7708d19ac19a9df922739520c707ee.tar.gz
buildroot-f5f5bd92df7708d19ac19a9df922739520c707ee.zip
openssh: selinux and pam support
[Thomas: in the sed expression, use % as a delimiter instead of /, since the line contains several / that all had to be escaped.] Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com> Reviewed-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/openssh')
-rw-r--r--package/openssh/openssh.mk16
1 files changed, 16 insertions, 0 deletions
diff --git a/package/openssh/openssh.mk b/package/openssh/openssh.mk
index 11a844e938..5a7162ffda 100644
--- a/package/openssh/openssh.mk
+++ b/package/openssh/openssh.mk
@@ -30,8 +30,24 @@ endif
OPENSSH_DEPENDENCIES = zlib openssl
ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
+define OPENSSH_INSTALL_PAM_CONF
+ $(INSTALL) -D -m 644 $(@D)/contrib/sshd.pam.generic $(TARGET_DIR)/etc/pam.d/sshd
+ $(SED) '\%password required /lib/security/pam_cracklib.so%d' $(TARGET_DIR)/etc/pam.d/sshd
+ $(SED) 's/\#UsePAM no/UsePAM yes/' $(TARGET_DIR)/etc/ssh/sshd_config
+endef
+
OPENSSH_DEPENDENCIES += linux-pam
OPENSSH_CONF_OPTS += --with-pam
+OPENSSH_POST_INSTALL_TARGET_HOOKS += OPENSSH_INSTALL_PAM_CONF
+else
+OPENSSH_CONF_OPTS += --without-pam
+endif
+
+ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
+OPENSSH_DEPENDENCIES += libselinux
+OPENSSH_CONF_OPTS += --with-selinux
+else
+OPENSSH_CONF_OPTS += --without-selinux
endif
define OPENSSH_INSTALL_INIT_SYSTEMD
OpenPOWER on IntegriCloud