Skip to contentSkip to conversation

pam-plugin-ccreds: add recipe

PATCH New Richard Leitner 1 participant 1 message Jun 4, 2018

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 pam-plugin-ccreds: add recipe

Add version 11 of the pam-plugin-ccreds with the debian patches and a fix for *.so symlink creation applied.

Upstreaming of these patches was requested by following pull-request:
https://github.com/PADL/pam_ccreds/pull/1

---
Changes v2:
+ fix [dev-so] QA Issue
+ add note on "upstream status" in commit message

---
 ...ke-sure-we-don-t-overflow-the-data-buffer.patch | 29 +++++++
 .../0002-add-minimum_uid-option.patch              | 97 ++++++++++++++++++++++
 ...03-Set-EXTENSION_SO-for-all-linux-targets.patch | 40 +++++++++
 .../recipes-extended/pam/pam-plugin-ccreds_11.bb   | 27 ++++++
 4 files changed, 193 insertions(+)
 create mode 100644 meta-oe/recipes-extended/pam/pam-plugin-ccreds/0001-make-sure-we-don-t-overflow-the-data-buffer.patch
 create mode 100644 meta-oe/recipes-extended/pam/pam-plugin-ccreds/0002-add-minimum_uid-option.patch
 create mode 100644 meta-oe/recipes-extended/pam/pam-plugin-ccreds/0003-Set-EXTENSION_SO-for-all-linux-targets.patch
 create mode 100644 meta-oe/recipes-extended/pam/pam-plugin-ccreds_11.bb
meta-oe/recipes-extended/pam/pam-plugin-ccreds/0001-make-sure-we-don-t-overflow-the-data-buffer.patch new file +29 -0
new file mode 100644
index 000000000..d7f8f5a96
@@ -0,0 +1,29 @@
+From 59a95494002ce57ace17d676544101e88a55265d Mon Sep 17 00:00:00 2001
+From: Nicolas Boullis <[email protected]>
+Date: Mon, 23 Mar 2009 10:46:44 +0100
+Subject: [PATCH 1/3] make sure we don't overflow the data buffer
+
+This patch was taken from Debian's libpam-ccreds v10-6 source:
+	0001-make-sure-we-don-t-overflow-the-data-buffer.patch
+
+Reviewed-by: Richard Leitner <[email protected]>
+---
+ cc_db.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cc_db.c b/cc_db.c
+index c0e0488..9371c4d 100644
+--- a/cc_db.c
++++ b/cc_db.c
+@@ -199,7 +199,7 @@ int pam_cc_db_get(void *_db, const char *keyname, size_t keylength,
+ 		return (rc == DB_NOTFOUND) ? PAM_AUTHINFO_UNAVAIL : PAM_SERVICE_ERR;
+ 	}
+ 
+-	if (val.size < *size) {
++	if (val.size > *size) {
+ 		return PAM_BUF_ERR;
+ 	}
+ 
+-- 
+2.11.0
+
meta-oe/recipes-extended/pam/pam-plugin-ccreds/0002-add-minimum_uid-option.patch new file +97 -0

97 lines not on this page · raw message

meta-oe/recipes-extended/pam/pam-plugin-ccreds/0003-Set-EXTENSION_SO-for-all-linux-targets.patch new file +40 -0
new file mode 100644
index 000000000..988c37442
@@ -0,0 +1,40 @@
+From 2b137b0364c57505a95cb498660e3b97b557540d Mon Sep 17 00:00:00 2001
+From: Richard Leitner <[email protected]>
+Date: Fri, 1 Jun 2018 13:24:15 +0200
+Subject: [PATCH 3/3] Set EXTENSION_SO for all linux* targets
+
+As EXTENSION_SO gets already set for linux and linux-gnu targets we
+should set it for all linux* targets. This is done by introducing a new
+"LINUX" value for the "TARGET_OS" helper variable.
+
+Signed-off-by: Richard Leitner <[email protected]>
+---
+ configure.in | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/configure.in b/configure.in
+index 0dbdf79..3829d9f 100644
+--- a/configure.in
++++ b/configure.in
+@@ -35,7 +35,8 @@ hpux*) pam_ccreds_so_LD="/bin/ld"
+   TARGET_OS="HPUX" ;;
+ solaris*) pam_ccreds_so_LD="/usr/ccs/bin/ld"
+   pam_ccreds_so_LDFLAGS="-B dynamic -M \$(srcdir)/exports.solaris -G -B group -lc" ;;
+-linux*) pam_ccreds_so_LDFLAGS="-shared -Wl,-Bdynamic -Wl,--version-script,\$(srcdir)/exports.linux" ;;
++linux*) pam_ccreds_so_LDFLAGS="-shared -Wl,-Bdynamic -Wl,--version-script,\$(srcdir)/exports.linux"
++  TARGET_OS="LINUX" ;;
+ *) pam_ccreds_so_LDFLAGS="-shared" ;;
+ esac
+ 
+@@ -43,7 +44,7 @@ AC_SUBST(pam_ccreds_so_LD)
+ AC_SUBST(pam_ccreds_so_LDFLAGS)
+ 
+ AM_CONDITIONAL(USE_NATIVE_LINKER, test -n "$pam_ccreds_so_LD")
+-AM_CONDITIONAL(EXTENSION_SO, test "$target_os" = "linux" -o "$target_os" = "linux-gnu")
++AM_CONDITIONAL(EXTENSION_SO, test "$TARGET_OS" = "LINUX")
+ AM_CONDITIONAL(EXTENSION_1, test "$TARGET_OS" = "HPUX")
+ 
+ if test -z "$use_gcrypt"; then
+-- 
+2.11.0
+
meta-oe/recipes-extended/pam/pam-plugin-ccreds_11.bb new file +27 -0
new file mode 100644
index 000000000..9a21d9045
@@ -0,0 +1,27 @@
+SUMMARY = "PAM cached credentials module"
+HOMEPAGE = "https://www.padl.com/OSS/pam_ccreds.html"
+SECTION = "libs"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+
+DEPENDS = "libpam openssl db"
+
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES = "pam"
+
+SRCREV = "376bb189ceb3a113954f1012c45be7ff09e148ba"
+
+SRC_URI = " \
+    git://github.com/PADL/pam_ccreds \
+    file://0001-make-sure-we-don-t-overflow-the-data-buffer.patch \
+    file://0002-add-minimum_uid-option.patch \
+    file://0003-Set-EXTENSION_SO-for-all-linux-targets.patch \
+"
+
+S = "${WORKDIR}/git"
+
+inherit autotools
+
+EXTRA_OECONF += "--libdir=${base_libdir} "
+
+FILES_${PN} += "${base_libdir}/security/pam*"
Signature · 1 line
2.11.0