summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_util.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-05-09 16:02:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:51 -0500
commita8360c4f6b40a669abf82a759c398561bc97aaa6 (patch)
tree8ccbfb005e6be3b6e437562bb2cda72c185643ac /source3/nsswitch/winbindd_util.c
parent555737a3fe38a247b5474fd6a80e6dc0d9bcaf5c (diff)
downloadsamba-a8360c4f6b40a669abf82a759c398561bc97aaa6.tar.gz
samba-a8360c4f6b40a669abf82a759c398561bc97aaa6.tar.bz2
samba-a8360c4f6b40a669abf82a759c398561bc97aaa6.zip
r6682: patch from Qiao Yang <qyang@stbernard.com> to use out own DC when getting the SID for a domain
(This used to be commit 2e0941ebc1d6a9a9498cc5a9f072d501293f8933)
Diffstat (limited to 'source3/nsswitch/winbindd_util.c')
-rw-r--r--source3/nsswitch/winbindd_util.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c
index d6aef04b4b..739a7ed2a7 100644
--- a/source3/nsswitch/winbindd_util.c
+++ b/source3/nsswitch/winbindd_util.c
@@ -224,7 +224,7 @@ static void add_trusted_domains( struct winbindd_domain *domain )
/* if the SID was empty, we better set it now */
if ( sid_equal(&dom_sids[i], &null_sid) ) {
-
+ enum SID_NAME_USE type;
new_domain = find_domain_from_name(names[i]);
/* this should never happen */
@@ -237,7 +237,12 @@ static void add_trusted_domains( struct winbindd_domain *domain )
/* call the cache method; which will operate on the winbindd_domain \
passed in and choose either rpc or ads as appropriate */
- result = domain->methods->domain_sid( new_domain, &new_domain->sid );
+ result = domain->methods->name_to_sid( domain,
+ mem_ctx,
+ new_domain->name,
+ NULL,
+ &new_domain->sid,
+ &type);
if ( NT_STATUS_IS_OK(result) )
sid_copy( &dom_sids[i], &new_domain->sid );