Skip to content

Commit

Permalink
pam_namespace: include stdint.h
Browse files Browse the repository at this point in the history
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: #733
  • Loading branch information
jhheider authored and ldv-alt committed Jan 17, 2024
1 parent 2dc3367 commit cc9d40b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/pam_namespace/pam_namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit cc9d40b

Please sign in to comment.