diff options
-rw-r--r-- | src/libpamtest.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libpamtest.c b/src/libpamtest.c index 74da180..4474736 100644 --- a/src/libpamtest.c +++ b/src/libpamtest.c @@ -271,6 +271,14 @@ static int pamtest_simple_conv(int num_msg, cctx->echo_on_idx++; break; case PAM_ERROR_MSG: + if (reply != NULL) { + ret = add_to_reply(&reply[i], msgm[i]->msg); + if (ret != PAM_SUCCESS) { + free_reply(reply, num_msg); + return ret; + } + } + if (cctx->data->out_err != NULL) { memcpy(cctx->data->out_err[cctx->err_idx], msgm[i]->msg, @@ -280,6 +288,14 @@ static int pamtest_simple_conv(int num_msg, } break; case PAM_TEXT_INFO: + if (reply != NULL) { + ret = add_to_reply(&reply[i], msgm[i]->msg); + if (ret != PAM_SUCCESS) { + free_reply(reply, num_msg); + return ret; + } + } + if (cctx->data->out_info != NULL) { memcpy(cctx->data->out_info[cctx->info_idx], msgm[i]->msg, |