summaryrefslogtreecommitdiff
path: root/modules/pam_unix/support.c
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2020-07-15 08:00:00 +0000
committerDmitry V. Levin <ldv@altlinux.org>2020-07-15 08:00:00 +0000
commitb36351dd0137034e79194023c8d687b495e785c4 (patch)
tree66e8f8b8f5d2de2872dc18e7cb6ae8588e074905 /modules/pam_unix/support.c
parent2231e9de36a80924112b09393967e0600b0cdb83 (diff)
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/support.c')
-rw-r--r--modules/pam_unix/support.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/pam_unix/support.c b/modules/pam_unix/support.c
index dc67238c..d669e951 100644
--- a/modules/pam_unix/support.c
+++ b/modules/pam_unix/support.c
@@ -677,7 +677,7 @@ int _unix_verify_password(pam_handle_t * pamh, const char *name
struct passwd *pwd = NULL;
char *salt = NULL;
char *data_name;
- char pw[MAXPASS + 1];
+ char pw[PAM_MAX_RESP_SIZE + 1];
int retval;
@@ -704,7 +704,7 @@ int _unix_verify_password(pam_handle_t * pamh, const char *name
strcpy(data_name + sizeof(FAIL_PREFIX) - 1, name);
}
- if (p != NULL && strlen(p) > MAXPASS) {
+ if (p != NULL && strlen(p) > PAM_MAX_RESP_SIZE) {
memset(pw, 0, sizeof(pw));
p = strncpy(pw, p, sizeof(pw) - 1);
}