summaryrefslogtreecommitdiff
path: root/modules/pam_cracklib/pam_cracklib.c
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@thkukuk.de>2006-05-22 17:27:54 +0000
committerThorsten Kukuk <kukuk@thkukuk.de>2006-05-22 17:27:54 +0000
commit9251be9693b1c8c56ed067438858e740cba57570 (patch)
tree17fe57914bae9c80901e3288831a14f43524b539 /modules/pam_cracklib/pam_cracklib.c
parent747fce30ecb18b776fd91aefdcf3ab3508b42fbf (diff)
Relevant BUGIDs: 1490956,1489818,1489808,1489792,1489804,1489658,1489634
Purpose of commit: bugfixes Commit summary: --------------- 2006-05-22 Thorsten Kukuk <kukuk@thkukuk.de> * modules/pam_listfile/pam_listfile.c (pam_sm_authenticate): Fix memory leaks, [#1490956] found by Coverity. * modules/pam_tally/pam_tally.c (pam_get_uid): Check return value of pam_get_user(). (tally_get_data): Check if oldtime is not NULL. [#1489818] found by Coverity. * modules/pam_mkhomedir/pam_mkhomedir.c (create_homedir): Don't ignore return value of stat(). [#1489808] found by Coverity. * modules/pam_mail/pam_mail.c (get_folder): Fix a potential NULL pointer dereference. [#1489792] found by Coverity. * libpam/Makefile.am: bump release number of libpam.so. * libpam/pam_misc.c (_pam_mkargv): Fix memory leak, [#1489804] found by Coverity. * modules/pam_echo/pam_echo.c (replace_and_print): Initialize str, [#1489658] found by Coverity. * modules/pam_cracklib/pam_cracklib.c (_pam_unix_approve_pass): Fix a potential NULL pointer dereference. (pam_sm_chauthtok): Remove dead code. [#1489634] found by Coverity.
Diffstat (limited to 'modules/pam_cracklib/pam_cracklib.c')
-rw-r--r--modules/pam_cracklib/pam_cracklib.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/modules/pam_cracklib/pam_cracklib.c b/modules/pam_cracklib/pam_cracklib.c
index 091a56f5..2f146fb4 100644
--- a/modules/pam_cracklib/pam_cracklib.c
+++ b/modules/pam_cracklib/pam_cracklib.c
@@ -473,10 +473,9 @@ static int _pam_unix_approve_pass(pam_handle_t *pamh,
if (!msg) {
retval = pam_get_item(pamh, PAM_USER, &user);
if (retval != PAM_SUCCESS || user == NULL) {
- if (ctrl & PAM_DEBUG_ARG) {
+ if (ctrl & PAM_DEBUG_ARG)
pam_syslog(pamh,LOG_ERR,"Can not get username");
- return PAM_AUTHTOK_ERR;
- }
+ return PAM_AUTHTOK_ERR;
}
msg = check_old_password(user, pass_new);
}
@@ -663,11 +662,6 @@ PAM_EXTERN int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
*/
_pam_drop(resp);
} else {
- retval = (retval == PAM_SUCCESS) ?
- PAM_AUTHTOK_RECOVERY_ERR:retval ;
- }
-
- if (retval != PAM_SUCCESS) {
if (ctrl && PAM_DEBUG_ARG)
pam_syslog(pamh, LOG_DEBUG,
"unable to obtain the password a second time");