diff options
author | Günther Deschner <gd@samba.org> | 2009-10-19 16:55:15 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-10-19 18:44:51 +0200 |
commit | 110a40d4bc043d2bb2316480e6ba66ece1bf04ad (patch) | |
tree | cda12bc5f514319713aaa999894a89c00d96f866 /nsswitch/libwbclient | |
parent | 71cfbf958cbb26dcc050bab9fd05b38556128d4f (diff) | |
download | samba-110a40d4bc043d2bb2316480e6ba66ece1bf04ad.tar.gz samba-110a40d4bc043d2bb2316480e6ba66ece1bf04ad.tar.bz2 samba-110a40d4bc043d2bb2316480e6ba66ece1bf04ad.zip |
libwbclient: fix wbcLookupDomainController().
Found by WINBIND-WBCLIENT torture test.
Guenther
Diffstat (limited to 'nsswitch/libwbclient')
-rw-r--r-- | nsswitch/libwbclient/wbc_util.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nsswitch/libwbclient/wbc_util.c b/nsswitch/libwbclient/wbc_util.c index 24b5922c59..16828ae5df 100644 --- a/nsswitch/libwbclient/wbc_util.c +++ b/nsswitch/libwbclient/wbc_util.c @@ -486,7 +486,8 @@ wbcErr wbcLookupDomainController(const char *domain, ZERO_STRUCT(request); ZERO_STRUCT(response); - strncpy(request.domain_name, domain, sizeof(request.domain_name)-1); + strncpy(request.data.dsgetdcname.domain_name, domain, + sizeof(request.data.dsgetdcname.domain_name)-1); request.flags = flags; @@ -500,7 +501,7 @@ wbcErr wbcLookupDomainController(const char *domain, &response); BAIL_ON_WBC_ERROR(wbc_status); - dc->dc_name = talloc_strdup(dc, response.data.dc_name); + dc->dc_name = talloc_strdup(dc, response.data.dsgetdcname.dc_unc); BAIL_ON_PTR_ERROR(dc->dc_name, wbc_status); *dc_info = dc; |