diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2020-07-15 08:00:00 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2020-07-15 08:00:00 +0000 |
commit | b36351dd0137034e79194023c8d687b495e785c4 (patch) | |
tree | 66e8f8b8f5d2de2872dc18e7cb6ae8588e074905 /modules/pam_unix/passverify.c | |
parent | 2231e9de36a80924112b09393967e0600b0cdb83 (diff) | |
download | pam-b36351dd0137034e79194023c8d687b495e785c4.tar.gz pam-b36351dd0137034e79194023c8d687b495e785c4.tar.bz2 pam-b36351dd0137034e79194023c8d687b495e785c4.zip |
pam_unix: use PAM_MAX_RESP_SIZE instead of its alias MAXPASS
* modules/pam_unix/passverify.h (MAXPASS): Remove.
* modules/pam_unix/passverify.c (read_passwords): Replace MAXPASS
with PAM_MAX_RESP_SIZE.
* modules/pam_unix/pam_unix_passwd.c (_pam_unix_approve_pass): Likewise.
* modules/pam_unix/support.c (_unix_verify_password): Likewise.
* modules/pam_unix/unix_chkpwd.c (main): Likewise.
* modules/pam_unix/unix_update.c (set_password): Likewise.
Diffstat (limited to 'modules/pam_unix/passverify.c')
-rw-r--r-- | modules/pam_unix/passverify.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/pam_unix/passverify.c b/modules/pam_unix/passverify.c index 7455eae6..d5cfd269 100644 --- a/modules/pam_unix/passverify.c +++ b/modules/pam_unix/passverify.c @@ -1190,14 +1190,14 @@ int read_passwords(int fd, int npass, char **passwords) { /* The passwords array must contain npass preallocated - * buffers of length MAXPASS + 1 + * buffers of length PAM_MAX_RESP_SIZE + 1 */ int rbytes = 0; int offset = 0; int i = 0; char *pptr; while (npass > 0) { - rbytes = read(fd, passwords[i]+offset, MAXPASS+1-offset); + rbytes = read(fd, passwords[i]+offset, PAM_MAX_RESP_SIZE+1-offset); if (rbytes < 0) { if (errno == EINTR) continue; |