diff options
author | Sam Hartman <hartmans@debian.org> | 2024-12-02 09:55:34 -0700 |
---|---|---|
committer | Sam Hartman <hartmans@debian.org> | 2024-12-02 09:55:34 -0700 |
commit | 4f3cfaf827bfa42a239c255092a128a3a02198bf (patch) | |
tree | eac7f023f043739b79b2a51bd68c3006acb12964 /libpamc/test/modules/pam_secret.c | |
parent | 6408d4b1baff9a7e58fd66e1d1c0871be0823777 (diff) | |
parent | 7c9fb6472dcfae34ddbf4fbc9ecfafae2cf173c3 (diff) | |
download | pam-4f3cfaf827bfa42a239c255092a128a3a02198bf.tar.gz pam-4f3cfaf827bfa42a239c255092a128a3a02198bf.tar.bz2 pam-4f3cfaf827bfa42a239c255092a128a3a02198bf.zip |
Update upstream source from tag 'upstream/1.7.0'
Update to upstream version '1.7.0'
with Debian dir 0b3cd490884352e14273caeca2f05c6a525499fa
Diffstat (limited to 'libpamc/test/modules/pam_secret.c')
-rw-r--r-- | libpamc/test/modules/pam_secret.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libpamc/test/modules/pam_secret.c b/libpamc/test/modules/pam_secret.c index f1c74c6f..da607b1f 100644 --- a/libpamc/test/modules/pam_secret.c +++ b/libpamc/test/modules/pam_secret.c @@ -123,15 +123,17 @@ int create_digest(const char *d1, const char *d2, const char *d3, if (fgets(buffer_33, 33, pipe) == NULL) { D(("failed to read digest")); + pclose(pipe); return 0; } if (strlen(buffer_33) != 32) { D(("digest was not 32 chars")); + pclose(pipe); return 0; } - fclose(pipe); + pclose(pipe); D(("done [%s]", buffer_33)); @@ -164,16 +166,14 @@ static int converse(pam_handle_t *pamh, struct ps_state_s *new) retval = conv->conv(1, &msg_ptr, &single_reply, conv->appdata_ptr); if (retval == PAM_SUCCESS) { if ((single_reply == NULL) || (single_reply->resp == NULL)) { - retval == PAM_CONV_ERR; + retval = PAM_CONV_ERR; } else { new->current_reply = (pamc_bp_t) single_reply->resp; single_reply->resp = NULL; } } - if (single_reply) { - free(single_reply); - } + free(single_reply); } #ifdef PAM_DEBUG @@ -380,7 +380,7 @@ static int auth_sequence(pam_handle_t *pamh, /* expect to receive the following {<seqid>|<a_cookie>} */ if (new->current_reply == NULL) { - D(("converstation returned [%s] but gave no reply", + D(("conversation returned [%s] but gave no reply", pam_strerror(pamh, retval))); new->state = PS_STATE_DEAD; return PAM_CONV_ERR; |