diff options
author | Andrew Bartlett <abartlet@samba.org> | 2003-02-20 10:43:21 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2003-02-20 10:43:21 +0000 |
commit | 215ff67a039d3dea516d70d538083db8833f7b7e (patch) | |
tree | 0d134c606ba0b7a37881c5582006e344aec4a496 | |
parent | f8d9cf27266d9ce563011e44281483a4dfd0708f (diff) | |
download | samba-215ff67a039d3dea516d70d538083db8833f7b7e.tar.gz samba-215ff67a039d3dea516d70d538083db8833f7b7e.tar.bz2 samba-215ff67a039d3dea516d70d538083db8833f7b7e.zip |
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)
-rw-r--r-- | source3/nsswitch/winbindd_ads.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |