From 28a8ae09e78f145aa24f53a8997a4232b4d64587 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Tue, 14 Dec 2010 14:44:44 -0500 Subject: Eliminate possible NULL-dereference in pam_check_user_search https://fedorahosted.org/sssd/ticket/719 --- src/responder/pam/pamsrv_cmd.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/responder') diff --git a/src/responder/pam/pamsrv_cmd.c b/src/responder/pam/pamsrv_cmd.c index 27a6195d..8b642074 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 :-) */ -- cgit