Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing include in modules/pam_namespace/pam_namespace.c #733

Closed
jhheider opened this issue Jan 17, 2024 · 0 comments · Fixed by #734
Closed

missing include in modules/pam_namespace/pam_namespace.c #733

jhheider opened this issue Jan 17, 2024 · 0 comments · Fixed by #734

Comments

@jhheider
Copy link
Contributor

modules/pam_namespace/pam_namespace.c makes use of SIZE_MAX but doesn't include stdint.h; resulting in 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)) {
      |                                         ^~~~~~~~
make[3]: *** [Makefile:819: pam_namespace.lo] Error 1

the following fixes it:

sed -i -e '/argv_parse\.h/a\
#include <stdint.h>\
' modules/pam_namespace/pam_namespace.c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants