summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2010-12-16 14:48:14 -0500
committerStephen Gallagher <sgallagh@redhat.com>2010-12-17 07:07:40 -0500
commitc0d9451e86d246496e456a0925730c60c946e1d9 (patch)
treef9c86a680d4539b320ca38a9fb6f29b8efc6e003
parent7215ce30acdc19e95e31d83518a20f75eec74112 (diff)
downloadsssd-c0d9451e86d246496e456a0925730c60c946e1d9.tar.gz
sssd-c0d9451e86d246496e456a0925730c60c946e1d9.tar.bz2
sssd-c0d9451e86d246496e456a0925730c60c946e1d9.zip
Fix unsafe return condition in ipa_access_handler
https://fedorahosted.org/sssd/ticket/718
-rw-r--r--src/providers/ipa/ipa_access.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/providers/ipa/ipa_access.c b/src/providers/ipa/ipa_access.c
index 130008d2..45f96c9b 100644
--- a/src/providers/ipa/ipa_access.c
+++ b/src/providers/ipa/ipa_access.c
@@ -1701,7 +1701,12 @@ void ipa_access_handler(struct be_req *be_req)
return;
fail:
- ipa_access_reply(hbac_ctx, pam_status);
+ if (hbac_ctx) {
+ /* Return an proper error */
+ ipa_access_reply(hbac_ctx, pam_status);
+ } else {
+ be_req->fn(be_req, DP_ERR_FATAL, pam_status, NULL);
+ }
}
static int hbac_retry(struct hbac_ctx *hbac_ctx)