libpam: Update to 1.3.1 7812/head
authorRosen Penev <rosenp@gmail.com>
Sun, 30 Dec 2018 19:34:29 +0000 (11:34 -0800)
committerRosen Penev <rosenp@gmail.com>
Sun, 30 Dec 2018 20:21:04 +0000 (12:21 -0800)
Upstream switched to GitHub for releases. Follow suit.

Rearranged Makefile quite a bit to be more similar to other projects.

Added PKG_BUILD_PARALLEL for faster compilation.

Added PKG_CPE_ID for proper CVE tracking.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
libs/libpam/Makefile
libs/libpam/patches/0005-build-fix-doc-build.patch
libs/libpam/patches/0007-Replace-strndupa-with-strcpy.patch

index b429451a5d7e80562e2aa21191a17d07da106d51..5c0952cd0fbd8c3f3ff89a611b99feb0c5f67b00 100644 (file)
@@ -8,17 +8,22 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libpam
-PKG_VERSION:=1.3.0
+PKG_VERSION:=1.3.1
 PKG_RELEASE:=1
 
-PKG_SOURCE:=Linux-PAM-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=http://www.linux-pam.org/library/
-PKG_HASH:=241aed1ef522f66ed672719ecf2205ec513fd0075ed80cda8e086a5b1a01d1bb
-PKG_INSTALL:=1
-PKG_FIXUP:=autoreconf
+PKG_SOURCE:=Linux-PAM-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://github.com/linux-pam/linux-pam/releases/download/v$(PKG_VERSION)
+PKG_HASH:=eff47a4ecd833fbf18de9686632a70ee8d0794b79aecb217ebd0ce11db4cd0db
+PKG_BUILD_DIR:=$(BUILD_DIR)/Linux-PAM-$(PKG_VERSION)
+
 PKG_MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
+PKG_LICENSE:=BSD-3c GPL
+PKG_LICENSE_FILES:=COPYING Copyright
+PKG_CPE_ID:=cpe:/a:kernel:linux-pam
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/Linux-PAM-$(PKG_VERSION)
+PKG_FIXUP:=autoreconf
+PKG_BUILD_PARALLEL:=1
+PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -33,23 +38,22 @@ define Package/libpam/description
        The Linux-PAM Pluggable Authentication Modules.
 endef
 
-TARGET_CFLAGS += $(FPIC)
-
-define Build/Configure
-       $(call Build/Configure/Default, \
-               --enable-shared \
-               --enable-static \
-               --enable-pamlocking \
-               --disable-prelude \
-               --disable-lckpwdf \
-               --disable-selinux \
-               --disable-nls \
-               --disable-rpath \
-               --disable-nis \
-               --disable-regenerate-docu \
-               --enable-db=no \
-       )
-endef
+CONFIGURE_ARGS += \
+       --enable-pamlocking \
+       --enable-shared \
+       --enable-static \
+       --disable-audit \
+       --disable-cracklib \
+       --disable-db \
+       --disable-prelude \
+       --disable-lckpwdf \
+       --disable-nis \
+       --disable-regenerate-docu \
+       --disable-rpath \
+       --disable-selinux \
+       --with-gnu-ld \
+       --without-mailspool \
+       --without-xauth
 
 define Build/InstallDev
        $(INSTALL_DIR) $(1)/lib
index cd9b0a80237285b17608ced608cdc79ce9b39680..6d56f8c047eb3c488f5e854fb8f25960260717d6 100644 (file)
@@ -26,7 +26,7 @@ index 3db4e37..5e6592a 100644
 +++ b/Makefile.am
 @@ -4,7 +4,10 @@
  
- AUTOMAKE_OPTIONS = 1.9 gnu dist-bzip2 check-news
+ AUTOMAKE_OPTIONS = 1.9 gnu dist-bzip2 dist-xz check-news
  
 -SUBDIRS = libpam tests libpamc libpam_misc modules po conf doc examples xtests
 +if ENABLE_REGENERATE_MAN
index 3adf4ec178a02a0faa2219595cd73d8199554969..11a97246ab3caf826e2630ff830da8659c54afb5 100644 (file)
@@ -23,13 +23,14 @@ index 0ab6548..2fbab4f 100644
    pid_t pid;
    int fds[2];
    int stdout_fds[2];
-@@ -178,11 +178,11 @@ call_exec (const char *pam_type, pam_handle_t *pamh,
+@@ -180,12 +180,12 @@ call_exec (const char *pam_type, pam_handle_t *pamh,
+             if (resp)
+               {
+                 pam_set_item (pamh, PAM_AUTHTOK, resp);
+-                authtok = strndupa (resp, PAM_MAX_RESP_SIZE);
++                strcpy (authtok, resp);
+                 _pam_drop (resp);
                }
-             pam_set_item (pamh, PAM_AUTHTOK, resp);
--            authtok = strndupa (resp, PAM_MAX_RESP_SIZE);
-+            strcpy (authtok, resp);
-             _pam_drop (resp);
            }
          else
 -          authtok = strndupa (void_pass, PAM_MAX_RESP_SIZE);
@@ -37,7 +38,7 @@ index 0ab6548..2fbab4f 100644
  
          if (pipe(fds) != 0)
            {
-@@ -222,23 +222,14 @@ call_exec (const char *pam_type, pam_handle_t *pamh,
+@@ -225,23 +225,14 @@ call_exec (const char *pam_type, pam_handle_t *pamh,
  
        if (expose_authtok) /* send the password to the child */
        {