summaryrefslogtreecommitdiffstats
path: root/source/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
commit88241cab983b2c7db7d477c6c4654694a7a56cd3 (patch)
tree7125e7da2a3b3341a24ea7991e48e3eb025b3060 /source/nsswitch/winbindd_util.c
parent8739d426caabe3794a018dd28ab139b08f88b603 (diff)
downloadsamba-88241cab983b2c7db7d477c6c4654694a7a56cd3.tar.gz
samba-88241cab983b2c7db7d477c6c4654694a7a56cd3.tar.xz
samba-88241cab983b2c7db7d477c6c4654694a7a56cd3.zip
added a basic ADS backend to winbind. More work needed, but at
least basic operations work
Diffstat (limited to 'source/nsswitch/winbindd_util.c')
-rw-r--r--source/nsswitch/winbindd_util.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/source/nsswitch/winbindd_util.c b/source/nsswitch/winbindd_util.c
index 258a9402251..50cc76f1e90 100644
--- a/source/nsswitch/winbindd_util.c
+++ b/source/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;