Bug 7697 - get_dc_name() fails when using ads and no domain is specified
Summary: get_dc_name() fails when using ads and no domain is specified
Status: NEW
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: Winbind (show other bugs)
Version: 3.5.5
Hardware: All All
: P3 normal
Target Milestone: ---
Assignee: Michael Adam
QA Contact: Samba QA Contact
Depends on:
Reported: 2010-09-25 10:05 UTC by Ryan Koski
Modified: 2010-09-25 10:07 UTC (History)
0 users

See Also:

patch to get_dc_name() (713 bytes, patch)
2010-09-25 10:07 UTC, Ryan Koski
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Koski 2010-09-25 10:05:17 UTC
get_dc_name() in source3/libsmb/namequery_dc.c fails when ads_dc_name() succeeds but no domain is specified in the original call to get_dc_name().

It appears that the point of get_dc_name() is to attempt to use ads if appropriate, and fall back on rpc if ads fails.  However, if ads_dc_name() succeeds get_dc_name() still returns false if the pass-in domain is NULL.  This affects the ability of winbindd/idmap_adex to look up information, and probably affects other areas of the system as well.
Comment 1 Ryan Koski 2010-09-25 10:07:22 UTC
Created attachment 5982 [details]
patch to get_dc_name()

Proposed patch