diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2024-01-04 18:24:03 +0100 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2024-01-15 20:01:23 +0000 |
commit | 05d50c9f29ef1a1c897feb604c0595142840a93e (patch) | |
tree | 90ca704479fba12d992f718bc5d68c841e5b5905 | |
parent | 5b059b8fcbcb4dab6eb3eb48303879adcface90a (diff) | |
download | pam-05d50c9f29ef1a1c897feb604c0595142840a93e.tar.gz pam-05d50c9f29ef1a1c897feb604c0595142840a93e.tar.bz2 pam-05d50c9f29ef1a1c897feb604c0595142840a93e.zip |
pam_unix: use more appropriate types
-rw-r--r-- | modules/pam_unix/bigcrypt.c | 2 | ||||
-rw-r--r-- | modules/pam_unix/passverify.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/modules/pam_unix/bigcrypt.c b/modules/pam_unix/bigcrypt.c index c1028668..f7c35a47 100644 --- a/modules/pam_unix/bigcrypt.c +++ b/modules/pam_unix/bigcrypt.c @@ -55,7 +55,7 @@ char *bigcrypt(const char *key, const char *salt) #ifdef HAVE_CRYPT_R struct crypt_data *cdata; #endif - unsigned long int keylen, n_seg, j; + size_t keylen, n_seg, j; char *cipher_ptr, *plaintext_ptr, *tmp_ptr, *salt_ptr; char keybuf[KEYBUF_SIZE + 1] = {}; diff --git a/modules/pam_unix/passverify.c b/modules/pam_unix/passverify.c index 303929a4..2c95bba2 100644 --- a/modules/pam_unix/passverify.c +++ b/modules/pam_unix/passverify.c @@ -53,7 +53,7 @@ static void strip_hpux_aging(char *hash) { - static const char valid[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + static const char *const valid = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "0123456789./"; if ((*hash != '$') && (strlen(hash) > 13)) { @@ -657,7 +657,7 @@ save_old_password(pam_handle_t *pamh, const char *forwho, const char *oldpass, int npas; FILE *pwfile, *opwfile; int err = 0; - int oldmask; + mode_t oldmask; int found = 0; struct passwd *pwd = NULL; struct stat st; @@ -834,7 +834,7 @@ PAMH_ARG_DECL(int unix_update_passwd, struct stat st; FILE *pwfile, *opwfile; int err = 1; - int oldmask; + mode_t oldmask; #ifdef WITH_SELINUX char *prev_context_raw = NULL; #endif @@ -957,7 +957,7 @@ PAMH_ARG_DECL(int unix_update_shadow, struct stat st; FILE *pwfile, *opwfile; int err = 0; - int oldmask; + mode_t oldmask; int wroteentry = 0; #ifdef WITH_SELINUX char *prev_context_raw = NULL; |