summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2010-12-14 14:44:44 -0500
committerStephen Gallagher <sgallagh@redhat.com>2010-12-14 15:35:28 -0500
commit28a8ae09e78f145aa24f53a8997a4232b4d64587 (patch)
tree90df6801521ba388371d7dbb86f933c8f35bf187
parent3241a0b89ea769c9d01b316136880cf2a8d3407f (diff)
downloadsssd-28a8ae09e78f145aa24f53a8997a4232b4d64587.tar.gz
sssd-28a8ae09e78f145aa24f53a8997a4232b4d64587.tar.xz
sssd-28a8ae09e78f145aa24f53a8997a4232b4d64587.zip
Eliminate possible NULL-dereference in pam_check_user_search
https://fedorahosted.org/sssd/ticket/719
-rw-r--r--src/responder/pam/pamsrv_cmd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/responder/pam/pamsrv_cmd.c b/src/responder/pam/pamsrv_cmd.c
index 27a6195d6..8b6420748 100644
--- a/src/responder/pam/pamsrv_cmd.c
+++ b/src/responder/pam/pamsrv_cmd.c
@@ -848,6 +848,13 @@ static int pam_check_user_search(struct pam_auth_req *preq)
return EOK;
}
+ if (!dom) {
+ /* Ensure that we don't try to check a provider without a domain,
+ * since this will cause a NULL-dereference below.
+ */
+ preq->check_provider = false;
+ }
+
if (preq->check_provider) {
/* dont loop forever :-) */