From patchwork Fri Sep 6 01:04:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Barnett X-Patchwork-Id: 273011 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 5CAED2C00BC for ; Fri, 6 Sep 2013 11:04:55 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8B3469373E; Fri, 6 Sep 2013 01:05:46 +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 7C6b104F7H4H; Fri, 6 Sep 2013 01:05:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id B8B82936E8; Fri, 6 Sep 2013 01:05:44 +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 E90F11BFA8B for ; Fri, 6 Sep 2013 01:04:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E35E78C00B for ; Fri, 6 Sep 2013 01:04:48 +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 l0Ce4V7+sWml for ; Fri, 6 Sep 2013 01:04:48 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from secvs02.rockwellcollins.com (secvs02.rockwellcollins.com [205.175.225.241]) by whitealder.osuosl.org (Postfix) with ESMTPS id 4271A8B7C9 for ; Fri, 6 Sep 2013 01:04:48 +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:47 -0500 Received: from ares ([131.198.63.11]) by collinscrsmtp02.rockwellcollins.com (Lotus Domino Release 8.5.2FP2 HF162) with ESMTP id 2013090520044724-751721 ; Thu, 5 Sep 2013 20:04:47 -0500 From: Ryan Barnett To: buildroot@busybox.net Date: Thu, 5 Sep 2013 20:04:19 -0500 Message-Id: <1378429464-12546-6-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:47 PM, Serialize by Router on CollinsCRSMTP02/CedarRapids/RockwellCollins(Release 8.5.2FP2 HF162|May 16, 2011) at 09/05/2013 08:04:47 PM, Serialize complete at 09/05/2013 08:04:47 PM X-TNEFEvaluated: 1 Subject: [Buildroot] [PATCH 05/10] linux-pam: 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 Added patches to fix issues with linux-pam's audit support and to correctly install pam_sepermit. Signed-off-by: Ryan Barnett --- ...t_log_acct_message_return_value_check_fix.patch | 16 ++++++++++++++++ ...inux-pam-sepermit-install-path-correction.patch | 11 +++++++++++ package/linux-pam/linux-pam.mk | 14 ++++++++++++++ 3 files changed, 41 insertions(+), 0 deletions(-) create mode 100644 package/linux-pam/linux-pam-audit_log_acct_message_return_value_check_fix.patch create mode 100644 package/linux-pam/linux-pam-sepermit-install-path-correction.patch diff --git a/package/linux-pam/linux-pam-audit_log_acct_message_return_value_check_fix.patch b/package/linux-pam/linux-pam-audit_log_acct_message_return_value_check_fix.patch new file mode 100644 index 0000000..d819f08 --- /dev/null +++ b/package/linux-pam/linux-pam-audit_log_acct_message_return_value_check_fix.patch @@ -0,0 +1,16 @@ +--- a/libpam/pam_audit.c 2011-06-21 04:04:56.000000000 -0500 ++++ b/libpam/pam_audit.c 2012-09-12 08:55:26.000000000 -0500 +@@ -41,11 +41,11 @@ + an official errno number, but must not. It can also be a audit + internal error code. Which makes errno useless :-((. Try the + best to fix it. */ +- errno = -rc; ++ errno = rc; + + pamh->audit_state |= PAMAUDIT_LOGGED; + +- if (rc < 0) { ++ if (rc <= 0) { + if (rc == -EPERM && getuid() != 0) + return 0; + if (errno != old_errno) { diff --git a/package/linux-pam/linux-pam-sepermit-install-path-correction.patch b/package/linux-pam/linux-pam-sepermit-install-path-correction.patch new file mode 100644 index 0000000..23b6ff8 --- /dev/null +++ b/package/linux-pam/linux-pam-sepermit-install-path-correction.patch @@ -0,0 +1,11 @@ +--- a/modules/pam_sepermit/Makefile.am 2012-08-15 06:08:43.000000000 -0500 ++++ b/modules/pam_sepermit/Makefile.am 2013-08-22 15:53:22.792515096 -0500 +@@ -35,7 +35,7 @@ + securelib_LTLIBRARIES = pam_sepermit.la + + install-data-local: +- mkdir -p $(sepermitlockdir) ++ mkdir -p $(DESTDIR)/$(sepermitlockdir) + endif + if ENABLE_REGENERATE_MAN + noinst_DATA = README pam_sepermit.8 sepermit.conf.5 diff --git a/package/linux-pam/linux-pam.mk b/package/linux-pam/linux-pam.mk index 4472cd4..022031b 100644 --- a/package/linux-pam/linux-pam.mk +++ b/package/linux-pam/linux-pam.mk @@ -26,4 +26,18 @@ ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) LINUX_PAM_MAKE_OPT += LIBS=-lintl endif +ifeq ($(BR2_PACKAGE_LIBSELINUX),y) + PAM_CONF_OPT += --enable-selinux + PAM_DEPENDENCIES += libselinux +else + PAM_CONF_OPT += --disable-selinux +endif + +ifeq ($(BR2_PACKAGE_AUDIT),y) + PAM_DEPENDENCIES += audit + PAM_CONF_OPT += --enable-audit +else + PAM_CONF_OPT += --disable-audit +endif + $(eval $(autotools-package))