diff options
author | Göran Uddeborg <goeran@uddeborg.se> | 2024-05-13 15:12:36 +0200 |
---|---|---|
committer | Göran Uddeborg <goeran@uddeborg.se> | 2024-05-13 15:45:32 +0200 |
commit | 55a20554f9cfb502e73a5d507828d3ce9aea1a8d (patch) | |
tree | 9bb2aa9976bf320e4d3ca99977a49f3904be67bd /libpam | |
parent | 99888b2566ac1694b610867e170b51d4556842f0 (diff) | |
download | pam-55a20554f9cfb502e73a5d507828d3ce9aea1a8d.tar.gz pam-55a20554f9cfb502e73a5d507828d3ce9aea1a8d.tar.bz2 pam-55a20554f9cfb502e73a5d507828d3ce9aea1a8d.zip |
libpam: make /etc/passwd checks 8 bit clean
libpam/pam_modutil_check_user.c: explicitly convert the character
read from /etc/passwd to type "char" to get the same signedness
as the one compared with. Otherwise the functionality will depend
on the (implementation defined) signedness of "char" on the
platform built for.
Diffstat (limited to 'libpam')
-rw-r--r-- | libpam/pam_modutil_check_user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpam/pam_modutil_check_user.c b/libpam/pam_modutil_check_user.c index 92fc74b1..4034e59d 100644 --- a/libpam/pam_modutil_check_user.c +++ b/libpam/pam_modutil_check_user.c @@ -51,7 +51,7 @@ pam_modutil_check_user_in_passwd(pam_handle_t *pamh, */ for (p = user_name; *p != '\0'; p++) { c = fgetc(fp); - if (c == EOF || c == '\n' || c != *p) + if (c == EOF || c == '\n' || (char)c != *p) break; } |