pam: return empty message when not in the appropriate state

This commit is contained in:
Nikos Mavrogiannopoulos
2015-02-19 08:54:26 +01:00
parent 953241fc56
commit 4e9a329b59

View File

@@ -205,8 +205,8 @@ static int pam_auth_msg(void* ctx, void *pool, char** msg)
struct pam_ctx_st * pctx = ctx;
if (pctx->state != PAM_S_INIT && pctx->state != PAM_S_WAIT_FOR_PASS) {
syslog(LOG_AUTH, "PAM-auth: conversation in wrong state (%d)", pctx->state);
return ERR_AUTH_FAIL;
*msg = NULL;
return 0;
}
if (pctx->state == PAM_S_INIT) {