summaryrefslogtreecommitdiff
path: root/modules/pam_stress/pam_stress.c
diff options
context:
space:
mode:
authorSteve Langasek <steve.langasek@ubuntu.com>2019-01-03 17:53:41 -0800
committerSteve Langasek <steve.langasek@ubuntu.com>2019-01-03 18:17:08 -0800
commit212b52cf29c06cc209bc8ac0540dbab1acdf1464 (patch)
tree58da0bf39f5c4122e4a1b4da20fdeea52b97a671 /modules/pam_stress/pam_stress.c
parent9c52e721044e7501c3d4567b36d222dc7326224a (diff)
parent56c8282d128fb484ffc77dff73abf42229b291d3 (diff)
New upstream version 1.1.0
Diffstat (limited to 'modules/pam_stress/pam_stress.c')
-rw-r--r--modules/pam_stress/pam_stress.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/pam_stress/pam_stress.c b/modules/pam_stress/pam_stress.c
index c254868f..01587fea 100644
--- a/modules/pam_stress/pam_stress.c
+++ b/modules/pam_stress/pam_stress.c
@@ -197,8 +197,7 @@ static int stress_get_password(pam_handle_t *pamh, int flags
}
return PAM_CONV_ERR;
}
- if (resp)
- free(resp);
+ free(resp);
}
*password = pass; /* this *MUST* be free()'d by this module */
@@ -238,7 +237,7 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags,
retval = PAM_USER_UNKNOWN; /* username was null */
return retval;
}
- else if ((ctrl & PAM_ST_DEBUG) && (retval == PAM_SUCCESS)) {
+ else if (ctrl & PAM_ST_DEBUG) {
pam_syslog(pamh, LOG_DEBUG,
"pam_sm_authenticate: username = %s", username);
}
@@ -426,7 +425,7 @@ int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
if (ctrl & PAM_ST_FAIL_1)
return PAM_AUTHTOK_LOCK_BUSY;
- if ( !(ctrl && PAM_ST_EXPIRED)
+ if ( !(ctrl & PAM_ST_EXPIRED)
&& (flags & PAM_CHANGE_EXPIRED_AUTHTOK)
&& (pam_get_data(pamh,"stress_new_pwd", &text)
!= PAM_SUCCESS || strcmp(text,"yes"))) {