From 2285b99cb1047ea85589ef23d4ca73278a15ee08 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 3 Dec 2001 06:04:18 +0000 Subject: added a basic ADS backend to winbind. More work needed, but at least basic operations work (This used to be commit 88241cab983b2c7db7d477c6c4654694a7a56cd3) --- source3/nsswitch/winbindd_util.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'source3/nsswitch/winbindd_util.c') diff --git a/source3/nsswitch/winbindd_util.c b/source3/nsswitch/winbindd_util.c index 258a940225..50cc76f1e9 100644 --- a/source3/nsswitch/winbindd_util.c +++ b/source3/nsswitch/winbindd_util.c @@ -135,6 +135,20 @@ BOOL get_domain_info(void) BOOL rv = False; TALLOC_CTX *mem_ctx; extern struct winbindd_methods msrpc_methods; + struct winbindd_methods *methods; + + switch (lp_security()) { +#ifdef HAVE_ADS + case SEC_ADS: + { + extern struct winbindd_methods ads_methods; + methods = &ads_methods; + break; + } +#endif + default: + methods = &msrpc_methods; + } DEBUG(1, ("getting trusted domain list\n")); @@ -152,7 +166,7 @@ BOOL get_domain_info(void) if (!NT_STATUS_IS_OK(result)) goto done; - add_trusted_domain(lp_workgroup(), &domain_sid, &msrpc_methods); + add_trusted_domain(lp_workgroup(), &domain_sid, methods); /* Enumerate list of trusted domains */ @@ -168,7 +182,7 @@ BOOL get_domain_info(void) /* Add each domain to the trusted domain list */ for(i = 0; i < num_doms; i++) - add_trusted_domain(domains[i], &sids[i], &msrpc_methods); + add_trusted_domain(domains[i], &sids[i], methods); rv = True; -- cgit