diff options
author | Andrew Tridgell <tridge@samba.org> | 2002-08-05 05:04:13 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2002-08-05 05:04:13 +0000 |
commit | e04c25b40650ea75b6f5e551c29c4acc1f4f24b9 (patch) | |
tree | 0cc18ee92075a927cd67d1fa935320c617a25612 /source3/nsswitch/winbindd_cm.c | |
parent | b0565dac76581400518fcbe1196fdc6297b9351c (diff) | |
download | samba-e04c25b40650ea75b6f5e551c29c4acc1f4f24b9.tar.gz samba-e04c25b40650ea75b6f5e551c29c4acc1f4f24b9.tar.bz2 samba-e04c25b40650ea75b6f5e551c29c4acc1f4f24b9.zip |
fixed wbinfo -t for netbiosless domains
(This used to be commit 68e70b000b273ba72206c87ad1efd6efc2c7c487)
Diffstat (limited to 'source3/nsswitch/winbindd_cm.c')
-rw-r--r-- | source3/nsswitch/winbindd_cm.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c index be28984791..2dec9f0558 100644 --- a/source3/nsswitch/winbindd_cm.c +++ b/source3/nsswitch/winbindd_cm.c @@ -97,7 +97,13 @@ struct get_dc_name_cache { static BOOL cm_ads_find_dc(const char *domain, struct in_addr *dc_ip, fstring srv_name) { ADS_STRUCT *ads; - ads = ads_init(domain, domain, NULL); + const char *realm = domain; + + if (strcasecmp(realm, lp_workgroup()) == 0) { + realm = lp_realm(); + } + + ads = ads_init(realm, domain, NULL); if (!ads) { return False; } |