aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_namespace/pam_namespace.c
diff options
context:
space:
mode:
authorJacob Heider <jacob@pkgx.dev>2024-01-17 11:49:26 -0500
committerDmitry V. Levin <ldv@strace.io>2024-01-17 16:49:26 +0000
commitcc9d40b7cdbd3e15ccaa324a0dda1680ef9dea13 (patch)
treee915da4c92b0654ff678b1de580bca7a5adb90e8 /modules/pam_namespace/pam_namespace.c
parent2dc3367c5f593eb54af4ef31e7c2d100f73eb364 (diff)
downloadpam-cc9d40b7cdbd3e15ccaa324a0dda1680ef9dea13.tar.gz
pam-cc9d40b7cdbd3e15ccaa324a0dda1680ef9dea13.tar.bz2
pam-cc9d40b7cdbd3e15ccaa324a0dda1680ef9dea13.zip
pam_namespace: include stdint.h
pam_namespace.c makes use of SIZE_MAX but doesn't include stdint.h, resulting in the following build failures on 1.6.0: pam_namespace.c: In function 'process_line': pam_namespace.c:649:41: error: 'SIZE_MAX' undeclared (first use in this function) 649 | if (count > UINT_MAX || count > SIZE_MAX / sizeof(uid_t)) { | ^~~~~~~~ pam_namespace.c:41:1: note: 'SIZE_MAX' is defined in header '<stdint.h>'; did you forget to '#include <stdint.h>'? 40 | #include "argv_parse.h" +++ |+#include <stdint.h> 41 | pam_namespace.c:649:41: note: each undeclared identifier is reported only once for each function it appears in 649 | if (count > UINT_MAX || count > SIZE_MAX / sizeof(uid_t)) { | ^~~~~~~~ Fixes: v1.6.0~100 ("pam_namespace: validate amount of uids in config") Resolves: https://github.com/linux-pam/linux-pam/issues/733
Diffstat (limited to 'modules/pam_namespace/pam_namespace.c')
-rw-r--r--modules/pam_namespace/pam_namespace.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/pam_namespace/pam_namespace.c b/modules/pam_namespace/pam_namespace.c
index f72d6718..b16731c2 100644
--- a/modules/pam_namespace/pam_namespace.c
+++ b/modules/pam_namespace/pam_namespace.c
@@ -34,6 +34,8 @@
#define _ATFILE_SOURCE
+#include "config.h"
+#include <stdint.h>
#include "pam_cc_compat.h"
#include "pam_inline.h"
#include "pam_namespace.h"