From patchwork Fri Sep 6 01:04:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Barnett X-Patchwork-Id: 273012 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id BC3C62C00BC for ; Fri, 6 Sep 2013 11:05:00 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E0972936CD; Fri, 6 Sep 2013 01:05:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rY2koJNNvnsr; Fri, 6 Sep 2013 01:05:51 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id E7E24937D1; Fri, 6 Sep 2013 01:05:50 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 4089C1BFA8B for ; Fri, 6 Sep 2013 01:04:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3A1E88C00B for ; Fri, 6 Sep 2013 01:04:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DELCzhFtW0ge for ; Fri, 6 Sep 2013 01:04:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from secvs01.rockwellcollins.com (secvs01.rockwellcollins.com [205.175.225.240]) by whitealder.osuosl.org (Postfix) with ESMTPS id 477878B7C9 for ; Fri, 6 Sep 2013 01:04:54 +0000 (UTC) Received: from nosuchhost.198.131.in-addr.arpa (HELO collinscrsmtp02.rockwellcollins.com) ([131.198.63.133]) by mail-virt.rockwellcollins.com with ESMTP; 05 Sep 2013 20:04:53 -0500 Received: from ares ([131.198.63.11]) by collinscrsmtp02.rockwellcollins.com (Lotus Domino Release 8.5.2FP2 HF162) with ESMTP id 2013090520045332-751723 ; Thu, 5 Sep 2013 20:04:53 -0500 From: Ryan Barnett To: buildroot@busybox.net Date: Thu, 5 Sep 2013 20:04:20 -0500 Message-Id: <1378429464-12546-7-git-send-email-rjbarnet@rockwellcollins.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1378429464-12546-1-git-send-email-rjbarnet@rockwellcollins.com> References: <1378429464-12546-1-git-send-email-rjbarnet@rockwellcollins.com> X-MIMETrack: Itemize by SMTP Server on CollinsCRSMTP02/CedarRapids/RockwellCollins(Release 8.5.2FP2 HF162|May 16, 2011) at 09/05/2013 08:04:53 PM, Serialize by Router on CollinsCRSMTP02/CedarRapids/RockwellCollins(Release 8.5.2FP2 HF162|May 16, 2011) at 09/05/2013 08:04:53 PM, Serialize complete at 09/05/2013 08:04:53 PM X-TNEFEvaluated: 1 Subject: [Buildroot] [PATCH 06/10] openssh: add support for SELinux X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Adding configuration options for SELinux along with install configuration of Linux-PAM for SSHd when the linux-pam packages is selected Signed-off-by: Ryan Barnett --- package/openssh/openssh.mk | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/package/openssh/openssh.mk b/package/openssh/openssh.mk index 4a5b125..6324ef8 100644 --- a/package/openssh/openssh.mk +++ b/package/openssh/openssh.mk @@ -12,9 +12,21 @@ OPENSSH_CONF_OPT = --disable-lastlog --disable-utmp \ OPENSSH_DEPENDENCIES = zlib openssl +define OPENSSH_INSTALL_PAM_CONF + $(INSTALL) -D -m 644 $(@D)/contrib/sshd.pam.generic $(TARGET_DIR)/etc/pam.d/sshd + sed -i '/password required \/lib\/security\/pam_cracklib.so/d' $(TARGET_DIR)/etc/pam.d/sshd + sed -i -e 's/\#UsePAM no/UsePAM yes/' $(TARGET_DIR)/etc/sshd_config +endef + ifeq ($(BR2_PACKAGE_LINUX_PAM),y) OPENSSH_DEPENDENCIES += linux-pam OPENSSH_CONF_OPT += --with-pam +OPENSSH_POST_INSTALL_TARGET_HOOKS += OPENSSH_INSTALL_PAM_CONF +endif + +ifeq ($(BR2_PACKAGE_LIBSELINUX),y) +OPENSSH_DEPENDENCIES += libselinux +OPENSSH_CONF_OPT += --with-selinux endif define OPENSSH_INSTALL_INITSCRIPT