summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-03-13 21:31:31 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-03-18 12:21:45 +0000
commit4fd93a7be408e3a9bc06adbaaf162bf27505934f (patch)
treeb38c00dcb97428d2cbdca2ae6b124d85391ab22f /meta/recipes-extended
parent20035573145bcac57736ad8806fa88054993469e (diff)
downloadpoky-4fd93a7be408e3a9bc06adbaaf162bf27505934f.tar.gz
pam: Fix build with musl
Apply a backported patch (From OE-Core rev: e4fbb97fda6fe6232df743e655d0488f2353a24e) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/pam/libpam/0001-pam_namespace-include-stdint-h.patch42
-rw-r--r--meta/recipes-extended/pam/libpam_1.5.3.bb1
2 files changed, 43 insertions, 0 deletions
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
new file mode 100644
index 0000000000..124e5f1c3c
--- /dev/null
+++ b/meta/recipes-extended/pam/libpam/0001-pam_namespace-include-stdint-h.patch
@@ -0,0 +1,42 @@
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_1.5.3.bb b/meta/recipes-extended/pam/libpam_1.5.3.bb
index 4dd9890606..2a53bb4cc5 100644
--- a/meta/recipes-extended/pam/libpam_1.5.3.bb
+++ b/meta/recipes-extended/pam/libpam_1.5.3.bb
@@ -24,6 +24,7 @@ SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/Linux-PAM-${PV}.tar.xz \
24 file://0001-examples-Replace-use-of-termio.h-with-termios.h.patch \ 24 file://0001-examples-Replace-use-of-termio.h-with-termios.h.patch \
25 file://run-ptest \ 25 file://run-ptest \
26 file://pam-volatiles.conf \ 26 file://pam-volatiles.conf \
27 file://0001-pam_namespace-include-stdint-h.patch \
27 " 28 "
28 29
29SRC_URI[sha256sum] = "7ac4b50feee004a9fa88f1dfd2d2fa738a82896763050cd773b3c54b0a818283" 30SRC_URI[sha256sum] = "7ac4b50feee004a9fa88f1dfd2d2fa738a82896763050cd773b3c54b0a818283"