diff options
author | Steve Langasek <steve.langasek@canonical.com> | 2020-08-11 14:54:29 -0700 |
---|---|---|
committer | Steve Langasek <steve.langasek@canonical.com> | 2020-08-11 14:54:29 -0700 |
commit | f6d08ed47a3da3c08345bce2ca366e961c52ad7c (patch) | |
tree | dcbd0efb229b17f696f7195671f05b354b4f70fc /xtests/tst-pam_pwhistory1.c | |
parent | 668b13da8f830c38388cecac45539972e80cb246 (diff) | |
parent | 9e5bea9e146dee574796259ca464ad2435be3590 (diff) | |
download | pam-f6d08ed47a3da3c08345bce2ca366e961c52ad7c.tar.gz pam-f6d08ed47a3da3c08345bce2ca366e961c52ad7c.tar.bz2 pam-f6d08ed47a3da3c08345bce2ca366e961c52ad7c.zip |
New upstream version 1.4.0
Diffstat (limited to 'xtests/tst-pam_pwhistory1.c')
-rw-r--r-- | xtests/tst-pam_pwhistory1.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xtests/tst-pam_pwhistory1.c b/xtests/tst-pam_pwhistory1.c index 5c3246fa..1641c298 100644 --- a/xtests/tst-pam_pwhistory1.c +++ b/xtests/tst-pam_pwhistory1.c @@ -46,8 +46,9 @@ #include <stdlib.h> #include <string.h> #include <security/pam_appl.h> +#include "pam_inline.h" -static int in_test; +static unsigned int in_test; static const char *passwords[] = { "pamhistory01", "pamhistory02", "pamhistory03", @@ -121,15 +122,14 @@ main(int argc, char *argv[]) if (argc > 1 && strcmp (argv[1], "-d") == 0) debug = 1; - for (in_test = 0; - in_test < (int)(sizeof (passwords)/sizeof (char *)); in_test++) + for (in_test = 0; in_test < PAM_ARRAY_SIZE(passwords); in_test++) { retval = pam_start("tst-pam_pwhistory1", user, &conv, &pamh); if (retval != PAM_SUCCESS) { if (debug) - fprintf (stderr, "pwhistory1-%d: pam_start returned %d\n", + fprintf (stderr, "pwhistory1-%u: pam_start returned %d\n", in_test, retval); return 1; } @@ -140,7 +140,7 @@ main(int argc, char *argv[]) if (retval != PAM_SUCCESS) { if (debug) - fprintf (stderr, "pwhistory1-%d: pam_chauthtok returned %d\n", + fprintf (stderr, "pwhistory1-%u: pam_chauthtok returned %d\n", in_test, retval); return 1; } @@ -150,7 +150,7 @@ main(int argc, char *argv[]) if (retval != PAM_MAXTRIES) { if (debug) - fprintf (stderr, "pwhistory1-%d: pam_chauthtok returned %d\n", + fprintf (stderr, "pwhistory1-%u: pam_chauthtok returned %d\n", in_test, retval); return 1; } |