From 215ff67a039d3dea516d70d538083db8833f7b7e Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 20 Feb 2003 10:43:21 +0000 Subject: for some (very weird) reason, the domain I was testing aginst would not return a DN for the user. Make sure we don't segfault. Andrew Bartlett (This used to be commit 9fdedeff6a3a9f8e8d048e6afd7001ad676c4e91) --- source3/nsswitch/winbindd_ads.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3') diff --git a/source3/nsswitch/winbindd_ads.c b/source3/nsswitch/winbindd_ads.c index be4ed1c667..9560a53fa0 100644 --- a/source3/nsswitch/winbindd_ads.c +++ b/source3/nsswitch/winbindd_ads.c @@ -490,6 +490,10 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain, } user_dn = ads_pull_string(ads, mem_ctx, msg, "distinguishedName"); + if (!user_dn) { + DEBUG(1,("lookup_usergroups(rid=%d) ads_search did not return a a distinguishedName!\n", user_rid)); + goto done; + } if (msg) ads_msgfree(ads, msg); -- cgit