summaryrefslogtreecommitdiff
path: root/libpam
diff options
context:
space:
mode:
authorTomas Mraz <tm@t8m.info>2005-09-17 09:16:20 +0000
committerTomas Mraz <tm@t8m.info>2005-09-17 09:16:20 +0000
commitd8992ad33da0910fda576dbac8a44fa4a0774a32 (patch)
treeef5b81aeeebafa6076da2880a77e6a989ef88678 /libpam
parent892e8a4e2cc4e877d7f73c8aa1a0f9e56a54517e (diff)
Relevant BUGIDs:
Purpose of commit: cleanup Commit summary: --------------- Log nonconforming conversation function behavior (by ldv)
Diffstat (limited to 'libpam')
-rw-r--r--libpam/pam_item.c3
-rw-r--r--libpam/pam_vprompt.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/libpam/pam_item.c b/libpam/pam_item.c
index 84ebeb7b..105a9de7 100644
--- a/libpam/pam_item.c
+++ b/libpam/pam_item.c
@@ -327,6 +327,9 @@ int pam_get_user(pam_handle_t *pamh, const char **user, const char *prompt)
pamh->former.fail_user = retval;
if (resp) {
+ if (retval != PAM_SUCCESS)
+ pam_syslog(pamh, LOG_WARNING,
+ "unexpected response from failed conversation function");
/*
* note 'resp' is allocated by the application and is
* correctly free()'d here
diff --git a/libpam/pam_vprompt.c b/libpam/pam_vprompt.c
index 5a8a2a17..8e852fe5 100644
--- a/libpam/pam_vprompt.c
+++ b/libpam/pam_vprompt.c
@@ -81,6 +81,9 @@ pam_vprompt (const pam_handle_t *pamh, int style, char **response,
pmsg = &msg;
retval = conv->conv (1, &pmsg, &pam_resp, conv->appdata_ptr);
+ if (retval != PAM_SUCCESS && pam_resp != NULL)
+ pam_syslog(pamh, LOG_WARNING,
+ "unexpected response from failed conversation function");
if (response)
*response = pam_resp == NULL ? NULL : pam_resp->resp;
else if (pam_resp && pam_resp->resp)