diff options
author | Jeremy Allison <jra@samba.org> | 2001-11-21 23:00:59 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-11-21 23:00:59 +0000 |
commit | f146325e7df80b26616225017ef6a60ff5f2e349 (patch) | |
tree | dc45a5b3308ee837158cce77f79ff696d4e004fa /source3/nsswitch/winbindd_util.c | |
parent | 646f8ca3e822290897e6298dd16ad3b4be78c07a (diff) | |
download | samba-f146325e7df80b26616225017ef6a60ff5f2e349.tar.gz samba-f146325e7df80b26616225017ef6a60ff5f2e349.tar.bz2 samba-f146325e7df80b26616225017ef6a60ff5f2e349.zip |
W2K doesn't seem to respond to *#0 names in node status. Ensure name
lookup uses password server parameter when looking for PDCs.
Jeremy.
(This used to be commit 54c968913d6553c6d834b068234ab176917075eb)
Diffstat (limited to 'source3/nsswitch/winbindd_util.c')
-rw-r--r-- | source3/nsswitch/winbindd_util.c | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c index 90292ec2d2..cf7a04e8ff 100644 --- a/source3/nsswitch/winbindd_util.c +++ b/source3/nsswitch/winbindd_util.c @@ -114,55 +114,54 @@ BOOL get_domain_info(void) uint32 enum_ctx = 0, num_doms = 0; char **domains = NULL; DOM_SID *sids = NULL, domain_sid; - NTSTATUS result; - CLI_POLICY_HND *hnd; + NTSTATUS result; + CLI_POLICY_HND *hnd; int i; - fstring level5_dom; - BOOL rv = False; - TALLOC_CTX *mem_ctx; + fstring level5_dom; + BOOL rv = False; + TALLOC_CTX *mem_ctx; DEBUG(1, ("getting trusted domain list\n")); - if (!(mem_ctx = talloc_init())) - return False; + if (!(mem_ctx = talloc_init())) + return False; /* Add our workgroup - keep handle to look up trusted domains */ - if (!(hnd = cm_get_lsa_handle(lp_workgroup()))) - goto done; + if (!(hnd = cm_get_lsa_handle(lp_workgroup()))) + goto done; - result = cli_lsa_query_info_policy(hnd->cli, mem_ctx, - &hnd->pol, 0x05, level5_dom, - &domain_sid); + result = cli_lsa_query_info_policy(hnd->cli, mem_ctx, + &hnd->pol, 0x05, level5_dom, &domain_sid); - if (!NT_STATUS_IS_OK(result)) - goto done; + if (!NT_STATUS_IS_OK(result)) + goto done; add_trusted_domain(lp_workgroup(), &domain_sid); /* Enumerate list of trusted domains */ - if (!(hnd = cm_get_lsa_handle(lp_workgroup()))) - goto done; + if (!(hnd = cm_get_lsa_handle(lp_workgroup()))) + goto done; - result = cli_lsa_enum_trust_dom(hnd->cli, mem_ctx, - &hnd->pol, &enum_ctx, &num_doms, - &domains, &sids); + result = cli_lsa_enum_trust_dom(hnd->cli, mem_ctx, + &hnd->pol, &enum_ctx, &num_doms, &domains, &sids); - if (!NT_STATUS_IS_OK(result)) - goto done; + if (!NT_STATUS_IS_OK(result)) + goto done; - /* Add each domain to the trusted domain list */ + /* Add each domain to the trusted domain list */ for(i = 0; i < num_doms; i++) add_trusted_domain(domains[i], &sids[i]); - rv = True; + rv = True; done: - talloc_destroy(mem_ctx); - return rv; + talloc_destroy(mem_ctx); + + return rv; } /* Free global domain info */ |