summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_util.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2007-05-06 19:01:54 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:21:47 -0500
commit6ef504d71fee47fe6fbc930f488c96dfc7e6aaf8 (patch)
treecb2ce089d4f0326327d572c0038c133f58574109 /source3/nsswitch/winbindd_util.c
parent8ff276fcb02111664c727178296590d97eb09319 (diff)
downloadsamba-6ef504d71fee47fe6fbc930f488c96dfc7e6aaf8.tar.gz
samba-6ef504d71fee47fe6fbc930f488c96dfc7e6aaf8.tar.bz2
samba-6ef504d71fee47fe6fbc930f488c96dfc7e6aaf8.zip
r22702: Convert both lookup name and lookup sid to follow the
same heuristic. First try our DC and then try a DC in the root of our forest. Use a temporary state since winbindd_lookupXXX_async() is called from various winbindd API entry points. Note this will break the compile. That will be fixed in the next commit. (This used to be commit b442644bac2a7d5853440254257ca34a8e7c25de)
Diffstat (limited to 'source3/nsswitch/winbindd_util.c')
-rw-r--r--source3/nsswitch/winbindd_util.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c
index d8d7249c2d..49d381913a 100644
--- a/source3/nsswitch/winbindd_util.c
+++ b/source3/nsswitch/winbindd_util.c
@@ -725,24 +725,17 @@ BOOL winbindd_lookup_sid_by_name(TALLOC_CTX *mem_ctx,
* are set, otherwise False.
**/
BOOL winbindd_lookup_name_by_sid(TALLOC_CTX *mem_ctx,
+ struct winbindd_domain *domain,
DOM_SID *sid,
char **dom_name,
char **name,
enum lsa_SidType *type)
{
NTSTATUS result;
- struct winbindd_domain *domain;
*dom_name = NULL;
*name = NULL;
- domain = find_lookup_domain_from_sid(sid);
-
- if (!domain) {
- DEBUG(1,("Can't find domain from sid\n"));
- return False;
- }
-
/* Lookup name */
result = domain->methods->sid_to_name(domain, mem_ctx, sid, dom_name, name, type);