summaryrefslogtreecommitdiffstats
path: root/source/nsswitch/winbindd_util.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-11-21 23:00:59 +0000
committerJeremy Allison <jra@samba.org>2001-11-21 23:00:59 +0000
commit54c968913d6553c6d834b068234ab176917075eb (patch)
treed7422bbebd42c1415cd6625d53ea783621f16d96 /source/nsswitch/winbindd_util.c
parentedb556b47446f75dc4987eee15276661eb6cec8d (diff)
downloadsamba-54c968913d6553c6d834b068234ab176917075eb.tar.gz
samba-54c968913d6553c6d834b068234ab176917075eb.tar.xz
samba-54c968913d6553c6d834b068234ab176917075eb.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.
Diffstat (limited to 'source/nsswitch/winbindd_util.c')
-rw-r--r--source/nsswitch/winbindd_util.c49
1 files changed, 24 insertions, 25 deletions
diff --git a/source/nsswitch/winbindd_util.c b/source/nsswitch/winbindd_util.c
index 90292ec2d28..cf7a04e8ff7 100644
--- a/source/nsswitch/winbindd_util.c
+++ b/source/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 */