From fe1fce0f767f07ce4568de3cb86fc8823e5d66ec Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Mon, 19 Oct 2015 13:10:51 -0400 Subject: [PATCH] PAM: successful authentication sets explicitly PAM_SUCCESSS Set PAM_SYSTEM_ERR as default pam_status to ensure that we always must set PAM_SUCCESSS explicitly for a successful authentication and will really return an error in all other cases. --- src/providers/dp_pam_data_util.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/providers/dp_pam_data_util.c b/src/providers/dp_pam_data_util.c index 10e91f5f7286db5e76ad98b6c7519f2482d006db..bed5db872d18e0c3ab13d7b7fd061749253cc72a 100644 --- a/src/providers/dp_pam_data_util.c +++ b/src/providers/dp_pam_data_util.c @@ -22,6 +22,8 @@ along with this program. If not, see . */ +#include + #include "providers/data_provider.h" #include "util/sss_cli_cmd.h" @@ -48,6 +50,8 @@ struct pam_data *create_pam_data(TALLOC_CTX *mem_ctx) goto failed; } + pd->pam_status = PAM_SYSTEM_ERR; + pd->authtok = sss_authtok_new(pd); if (pd->authtok == NULL) { DEBUG(SSSDBG_CRIT_FAILURE, "talloc_zero failed.\n"); -- 2.1.0