summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/pam
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/pam')
-rw-r--r--meta/recipes-extended/pam/libpam/0001-examples-Replace-use-of-termio.h-with-termios.h.patch39
-rw-r--r--meta/recipes-extended/pam/libpam/0001-pam_namespace-include-stdint-h.patch42
-rw-r--r--meta/recipes-extended/pam/libpam/libpam-xtests.patch22
-rw-r--r--meta/recipes-extended/pam/libpam_1.6.1.bb (renamed from meta/recipes-extended/pam/libpam_1.5.3.bb)10
4 files changed, 19 insertions, 94 deletions
diff --git a/meta/recipes-extended/pam/libpam/0001-examples-Replace-use-of-termio.h-with-termios.h.patch b/meta/recipes-extended/pam/libpam/0001-examples-Replace-use-of-termio.h-with-termios.h.patch
deleted file mode 100644
index 95c437df4f..0000000000
--- a/meta/recipes-extended/pam/libpam/0001-examples-Replace-use-of-termio.h-with-termios.h.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1From 9b96fcfa5748934b8b6a4db4ee25a5e3165905c0 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 1 Jul 2023 07:48:17 -0700
4Subject: [PATCH] examples: Replace use of termio.h with termios.h
5
6Fixes build with musl and makes it portable
7
8Upstream-Status: Backport [https://github.com/linux-pam/linux-pam/commit/5374f677e4cae669eb9accf2449178b602e8a40a]
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 examples/tty_conv.c | 5 +++--
12 1 file changed, 3 insertions(+), 2 deletions(-)
13
14diff --git a/examples/tty_conv.c b/examples/tty_conv.c
15index 23f0684..db22500 100644
16--- a/examples/tty_conv.c
17+++ b/examples/tty_conv.c
18@@ -6,7 +6,8 @@
19 #include <string.h>
20 #include <errno.h>
21 #include <unistd.h>
22-#include <termio.h>
23+#include <termios.h>
24+#include <sys/ioctl.h>
25 #include <security/pam_appl.h>
26
27 /***************************************
28@@ -16,7 +17,7 @@
29 ***************************************/
30 static void echoOff(int fd, int off)
31 {
32- struct termio tty;
33+ struct termios tty;
34 if (ioctl(fd, TCGETA, &tty) < 0)
35 {
36 fprintf(stderr, "TCGETA failed: %s\n", strerror(errno));
37--
382.41.0
39
diff --git a/meta/recipes-extended/pam/libpam/0001-pam_namespace-include-stdint-h.patch b/meta/recipes-extended/pam/libpam/0001-pam_namespace-include-stdint-h.patch
deleted file mode 100644
index 124e5f1c3c..0000000000
--- a/meta/recipes-extended/pam/libpam/0001-pam_namespace-include-stdint-h.patch
+++ /dev/null
@@ -1,42 +0,0 @@
1From cc9d40b7cdbd3e15ccaa324a0dda1680ef9dea13 Mon Sep 17 00:00:00 2001
2From: Jacob Heider <jacob@pkgx.dev>
3Date: Wed, 17 Jan 2024 11:49:26 -0500
4Subject: [PATCH] pam_namespace: include stdint.h
5
6pam_namespace.c makes use of SIZE_MAX but doesn't include stdint.h,
7resulting in the following build failures on 1.6.0:
8
9 pam_namespace.c: In function 'process_line':
10 pam_namespace.c:649:41: error: 'SIZE_MAX' undeclared (first use in this function)
11 649 | if (count > UINT_MAX || count > SIZE_MAX / sizeof(uid_t)) {
12 | ^~~~~~~~
13 pam_namespace.c:41:1: note: 'SIZE_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'?
14 40 | #include "argv_parse.h"
15 +++ |+#include <stdint.h>
16 41 |
17 pam_namespace.c:649:41: note: each undeclared identifier is reported only once for each function it appears in
18 649 | if (count > UINT_MAX || count > SIZE_MAX / sizeof(uid_t)) {
19 | ^~~~~~~~
20
21Fixes: v1.6.0~100 ("pam_namespace: validate amount of uids in config")
22Resolves: https://github.com/linux-pam/linux-pam/issues/733
23
24Upstream-Status: Backport [https://github.com/linux-pam/linux-pam/commit/cc9d40b7cdbd3e15ccaa324a0dda1680ef9dea13]
25Signed-off-by: Khem Raj <raj.khem@gmail.com>
26---
27 modules/pam_namespace/pam_namespace.c | 2 ++
28 1 file changed, 2 insertions(+)
29
30diff --git a/modules/pam_namespace/pam_namespace.c b/modules/pam_namespace/pam_namespace.c
31index f72d67189..b16731c22 100644
32--- a/modules/pam_namespace/pam_namespace.c
33+++ b/modules/pam_namespace/pam_namespace.c
34@@ -34,6 +34,8 @@
35
36 #define _ATFILE_SOURCE
37
38+#include "config.h"
39+#include <stdint.h>
40 #include "pam_cc_compat.h"
41 #include "pam_inline.h"
42 #include "pam_namespace.h"
diff --git a/meta/recipes-extended/pam/libpam/libpam-xtests.patch b/meta/recipes-extended/pam/libpam/libpam-xtests.patch
index ea145899b4..f2dafa72a5 100644
--- a/meta/recipes-extended/pam/libpam/libpam-xtests.patch
+++ b/meta/recipes-extended/pam/libpam/libpam-xtests.patch
@@ -1,13 +1,21 @@
1This patch is used to create a new sub package libpam-xtests to do more checks. 1From 060726f7e60c8ecb5bf50fd776910b290d9a0a69 Mon Sep 17 00:00:00 2001
2From: Kang Kai <kai.kang@windriver.com>
3Date: Tue, 19 Jul 2011 17:08:31 +0800
4Subject: [PATCH] This patch is used to create a new sub package libpam-xtests
5 to do more checks.
2 6
3Upstream-Status: Pending 7Upstream-Status: Pending
4 8
5Signed-off-by: Kang Kai <kai.kang@windriver.com> 9Signed-off-by: Kang Kai <kai.kang@windriver.com>
6Index: Linux-PAM-1.3.0/xtests/Makefile.am 10---
7=================================================================== 11 xtests/Makefile.am | 17 ++++++++++++++++-
8--- Linux-PAM-1.3.0.orig/xtests/Makefile.am 12 1 file changed, 16 insertions(+), 1 deletion(-)
9+++ Linux-PAM-1.3.0/xtests/Makefile.am 13
10@@ -7,7 +7,7 @@ AM_CFLAGS = -DLIBPAM_COMPILE -I$(top_src 14diff --git a/xtests/Makefile.am b/xtests/Makefile.am
15index acf9746..9826c9f 100644
16--- a/xtests/Makefile.am
17+++ b/xtests/Makefile.am
18@@ -8,7 +8,7 @@ AM_CFLAGS = -DLIBPAM_COMPILE -I$(top_srcdir)/libpam/include \
11 LDADD = $(top_builddir)/libpam/libpam.la \ 19 LDADD = $(top_builddir)/libpam/libpam.la \
12 $(top_builddir)/libpam_misc/libpam_misc.la 20 $(top_builddir)/libpam_misc/libpam_misc.la
13 21
@@ -16,7 +24,7 @@ Index: Linux-PAM-1.3.0/xtests/Makefile.am
16 24
17 EXTRA_DIST = run-xtests.sh tst-pam_dispatch1.pamd tst-pam_dispatch2.pamd \ 25 EXTRA_DIST = run-xtests.sh tst-pam_dispatch1.pamd tst-pam_dispatch2.pamd \
18 tst-pam_dispatch3.pamd tst-pam_dispatch4.pamd \ 26 tst-pam_dispatch3.pamd tst-pam_dispatch4.pamd \
19@@ -51,3 +51,18 @@ EXTRA_PROGRAMS = $(XTESTS) 27@@ -55,3 +55,18 @@ EXTRA_PROGRAMS = $(XTESTS)
20 28
21 xtests: $(XTESTS) run-xtests.sh 29 xtests: $(XTESTS) run-xtests.sh
22 "$(srcdir)"/run-xtests.sh "$(srcdir)" ${XTESTS} ${NOSRCTESTS} 30 "$(srcdir)"/run-xtests.sh "$(srcdir)" ${XTESTS} ${NOSRCTESTS}
diff --git a/meta/recipes-extended/pam/libpam_1.5.3.bb b/meta/recipes-extended/pam/libpam_1.6.1.bb
index 2a53bb4cc5..9f2106ea73 100644
--- a/meta/recipes-extended/pam/libpam_1.5.3.bb
+++ b/meta/recipes-extended/pam/libpam_1.6.1.bb
@@ -21,13 +21,11 @@ SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/Linux-PAM-${PV}.tar.xz \
21 file://pam.d/common-session-noninteractive \ 21 file://pam.d/common-session-noninteractive \
22 file://pam.d/other \ 22 file://pam.d/other \
23 file://libpam-xtests.patch \ 23 file://libpam-xtests.patch \
24 file://0001-examples-Replace-use-of-termio.h-with-termios.h.patch \
25 file://run-ptest \ 24 file://run-ptest \
26 file://pam-volatiles.conf \ 25 file://pam-volatiles.conf \
27 file://0001-pam_namespace-include-stdint-h.patch \
28 " 26 "
29 27
30SRC_URI[sha256sum] = "7ac4b50feee004a9fa88f1dfd2d2fa738a82896763050cd773b3c54b0a818283" 28SRC_URI[sha256sum] = "f8923c740159052d719dbfc2a2f81942d68dd34fcaf61c706a02c9b80feeef8e"
31 29
32DEPENDS = "bison-native flex-native cracklib libxml2-native virtual/crypt" 30DEPENDS = "bison-native flex-native cracklib libxml2-native virtual/crypt"
33 31
@@ -140,16 +138,16 @@ do_install() {
140 rm -rf ${D}${sysconfdir}/init.d/ 138 rm -rf ${D}${sysconfdir}/init.d/
141 rm -rf ${D}${sysconfdir}/rc* 139 rm -rf ${D}${sysconfdir}/rc*
142 install -d ${D}${nonarch_libdir}/tmpfiles.d 140 install -d ${D}${nonarch_libdir}/tmpfiles.d
143 install -m 0644 ${WORKDIR}/pam-volatiles.conf \ 141 install -m 0644 ${UNPACKDIR}/pam-volatiles.conf \
144 ${D}${nonarch_libdir}/tmpfiles.d/pam.conf 142 ${D}${nonarch_libdir}/tmpfiles.d/pam.conf
145 else 143 else
146 install -d ${D}${sysconfdir}/default/volatiles 144 install -d ${D}${sysconfdir}/default/volatiles
147 install -m 0644 ${WORKDIR}/99_pam \ 145 install -m 0644 ${UNPACKDIR}/99_pam \
148 ${D}${sysconfdir}/default/volatiles/ 146 ${D}${sysconfdir}/default/volatiles/
149 fi 147 fi
150 148
151 install -d ${D}${sysconfdir}/pam.d/ 149 install -d ${D}${sysconfdir}/pam.d/
152 install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ 150 install -m 0644 ${UNPACKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/
153 151
154 # The lsb requires unix_chkpwd has setuid permission 152 # The lsb requires unix_chkpwd has setuid permission
155 chmod 4755 ${D}${sbindir}/unix_chkpwd 153 chmod 4755 ${D}${sbindir}/unix_chkpwd