[SSSD] [PATCH] Fix potential NULL-dereference in krb5_auth_done()
Sumit Bose
sbose at redhat.com
Tue Dec 21 10:59:58 UTC 2010
Hi,
I introduced a potential NULL-dereference with the wait-queue patch.
This patch should fix it and ticket #745.
bye,
Sumit
-------------- next part --------------
From 56465a90e4f69255a8848b5a045d5efb6f02cb1c Mon Sep 17 00:00:00 2001
From: Sumit Bose <sbose at redhat.com>
Date: Mon, 20 Dec 2010 21:55:38 +0100
Subject: [PATCH] Fix potential NULL-dereference in krb5_auth_done()
https://fedorahosted.org/sssd/ticket/745
---
src/providers/krb5/krb5_auth.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/providers/krb5/krb5_auth.c b/src/providers/krb5/krb5_auth.c
index ce3dea7..49dc6d2 100644
--- a/src/providers/krb5/krb5_auth.c
+++ b/src/providers/krb5/krb5_auth.c
@@ -1182,12 +1182,12 @@ void krb5_auth_done(struct tevent_req *req)
}
krb5_ctx = get_krb5_ctx(be_req);
- if (krb5_ctx == NULL) {
+ if (krb5_ctx != NULL) {
+ check_wait_queue(krb5_ctx, pd->user);
+ } else {
DEBUG(1, ("Kerberos context not available.\n"));
}
- check_wait_queue(krb5_ctx, pd->user);
-
krb_reply(be_req, dp_err, pd->pam_status);
}
--
1.7.3.2
More information about the sssd-devel
mailing list