[OpenWrt-Devel] [PATCH] / [Pull request] Patches to BusyBox to fix build errors when PAM support is enabled.

Stephen Parry sgparry at mainscreen.com
Fri Aug 15 09:03:11 EDT 2014


Dear Felix,

I have patched the BusyBox package to allow it to build correctly when
CONFIG_BUSYBOX_CONFIG_PAM is set. The use case here is that I want to
secure the console with a login where I hope to selectively allow or
deny given users access based on their entries in LDAP. I have not fully
tested the resulting login behaviour, but this patch does at least allow
BusyBox to build without breaking.

Can this please be included in fixes for the final release of BB?

Many Thanks
Stephen Parry

-------------------------------------------------------------------------------------------------------------------
Patch to BusyBox Makefile to fix build errors when PAM support is enabled.

Signed-off-by: Stephen G. Parry <sgparry at mainscreen.com>

-------------------------------------------------------------------------------------------------------------------
The following changes since commit 7a828618dc7fc7205f73013d14f91a252fa19672:

  odhcpd: multiple DHCPv4 improvements (thx Christian Mehlis)
(2014-08-12 13:30:38 +0000)

are available in the git repository at:

  https://github.com/sgparry/openwrt-patched.git sgp-bb-pam-patch

for you to fetch changes up to 0a0a5ab6458e27c153f1c07329f1df88372acecd:

  Patch to BusyBox Makefile to fix build errors when PAM support is
enabled. (2014-08-15 13:57:06 +0100)

----------------------------------------------------------------
Stephen Parry (1):
      Patch to BusyBox Makefile to fix build errors when PAM support is
enabled.

 package/utils/busybox/Makefile | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/package/utils/busybox/Makefile b/package/utils/busybox/Makefile
index 3380885..668679e 100644
--- a/package/utils/busybox/Makefile
+++ b/package/utils/busybox/Makefile
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=http://www.busybox.net/downloads \
 		http://distfiles.gentoo.org/distfiles/
 PKG_MD5SUM:=337d1a15ab1cb1d4ed423168b1eb7d7e

-PKG_BUILD_DEPENDS:=BUSYBOX_USE_LIBRPC:librpc
+PKG_BUILD_DEPENDS:=BUSYBOX_USE_LIBRPC:librpc BUSYBOX_CONFIG_PAM:libpam
 PKG_BUILD_PARALLEL:=1
 PKG_CHECK_FORMAT_SECURITY:=0

@@ -42,7 +42,7 @@ define Package/busybox
   MAINTAINER:=Felix Fietkau <nbd at openwrt.org>
   TITLE:=Core utilities for embedded Linux
   URL:=http://busybox.net/
-  DEPENDS:=+BUSYBOX_USE_LIBRPC:librpc
+  DEPENDS:=+BUSYBOX_USE_LIBRPC:librpc +BUSYBOX_CONFIG_PAM:libpam
   MENU:=1
 endef

@@ -80,6 +80,12 @@ ifdef CONFIG_BUSYBOX_USE_LIBRPC
   LDLIBS += rpc
 endif

+ifdef CONFIG_BUSYBOX_CONFIG_PAM
+  TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
+  export LDFLAGS=$(TARGET_LDFLAGS)
+  LDLIBS += pam pam_misc pthread
+endif
+
 define Build/Compile
 	+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
 		CC="$(TARGET_CC)" \
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list