From f622e6f5ff8cfafad8383d4bc17044ceb38c7d86 Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Wed, 21 Feb 2007 20:27:28 +0000 Subject: Relevant BUGIDs: Purpose of commit: cleanup Commit summary: --------------- 2007-02-21 Tomas Mraz * modules/pam_unix/unix_chkpwd.c (_unix_verify_password): Test for allocation failure in bigcrypt(). * modules/pam_unix/pam_unix_passwd.c (pam_sm_chauthtok): Allow modification of '*' password by root. --- ChangeLog | 8 ++++++++ modules/pam_unix/pam_unix_passwd.c | 7 ------- modules/pam_unix/unix_chkpwd.c | 4 ++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 091d5d88..5bd2a18e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-02-21 Tomas Mraz + + * modules/pam_unix/unix_chkpwd.c (_unix_verify_password): Test for + allocation failure in bigcrypt(). + + * modules/pam_unix/pam_unix_passwd.c (pam_sm_chauthtok): Allow modification + of '*' password by root. + 2007-02-06 Tomas Mraz * modules/pam_loginuid/pam_loginuid.c (set_loginuid): Remove diff --git a/modules/pam_unix/pam_unix_passwd.c b/modules/pam_unix/pam_unix_passwd.c index 8921d1cc..bec856f4 100644 --- a/modules/pam_unix/pam_unix_passwd.c +++ b/modules/pam_unix/pam_unix_passwd.c @@ -1077,13 +1077,6 @@ PAM_EXTERN int pam_sm_chauthtok(pam_handle_t * pamh, int flags, user); return PAM_USER_UNKNOWN; } - if (!_unix_shadowed(pwd) && - (strchr(pwd->pw_passwd, '*') != NULL)) { - pam_syslog(pamh, LOG_DEBUG, - "user \"%s\" does not have modifiable password", - user); - return PAM_USER_UNKNOWN; - } } /* diff --git a/modules/pam_unix/unix_chkpwd.c b/modules/pam_unix/unix_chkpwd.c index 0ef2ccd8..236ad5c2 100644 --- a/modules/pam_unix/unix_chkpwd.c +++ b/modules/pam_unix/unix_chkpwd.c @@ -229,11 +229,11 @@ static int _unix_verify_password(const char *name, const char *p, int nullok) * stored string with the subset of bigcrypt's result. * Bug 521314. */ - if (salt_len == 13 && strlen(pp) > salt_len) { + if (pp && salt_len == 13 && strlen(pp) > salt_len) { _pam_overwrite(pp+salt_len); } - if (strcmp(pp, salt) == 0) { + if (pp && strcmp(pp, salt) == 0) { retval = PAM_SUCCESS; } } -- cgit v1.2.3