summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_util.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-12-03 06:04:18 +0000
committerAndrew Tridgell <tridge@samba.org>2001-12-03 06:04:18 +0000
commit2285b99cb1047ea85589ef23d4ca73278a15ee08 (patch)
tree4075ad18c9d81dba881b23b4a8d263b1ab9078fb /source3/nsswitch/winbindd_util.c
parentfeb4f52f134d463c9871cd1709897a4b9ccfc6d2 (diff)
downloadsamba-2285b99cb1047ea85589ef23d4ca73278a15ee08.tar.gz
samba-2285b99cb1047ea85589ef23d4ca73278a15ee08.tar.bz2
samba-2285b99cb1047ea85589ef23d4ca73278a15ee08.zip
added a basic ADS backend to winbind. More work needed, but at
least basic operations work (This used to be commit 88241cab983b2c7db7d477c6c4654694a7a56cd3)
Diffstat (limited to 'source3/nsswitch/winbindd_util.c')
-rw-r--r--source3/nsswitch/winbindd_util.c18
1 files changed, 16 insertions, 2 deletions
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;