summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2005-06-03 15:42:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:57:05 -0500
commit5084d49052f47626b61e53add818fefaacc101b0 (patch)
treedebccf837c8d847ad2cd2749b4e3da3ae340dfe8 /source3/auth
parenta01de91394f1723100bcd49870422e03f69afb7e (diff)
downloadsamba-5084d49052f47626b61e53add818fefaacc101b0.tar.gz
samba-5084d49052f47626b61e53add818fefaacc101b0.tar.bz2
samba-5084d49052f47626b61e53add818fefaacc101b0.zip
r7243: Don't look at gencache.tdb for the trusted domains if winbind is around.
Volker (This used to be commit 94acb93f57b963bf137c6ddd644a147f4d0b5175)
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_util.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 79205f1206..31bfa2fe01 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -1532,11 +1532,26 @@ BOOL is_trusted_domain(const char* dom_name)
return True;
}
else {
- /* if winbindd is not up and we are a domain member) then we need to update the
- trustdom_cache ourselves */
+ NSS_STATUS result;
- if ( !winbind_ping() )
- update_trustdom_cache();
+ /* If winbind is around, ask it */
+
+ result = wb_is_trusted_domain(dom_name);
+
+ if (result == NSS_STATUS_SUCCESS) {
+ return True;
+ }
+
+ if (result == NSS_STATUS_NOTFOUND) {
+ /* winbind could not find the domain */
+ return False;
+ }
+
+ /* The only other possible result is that winbind is not up
+ and running. We need to update the trustdom_cache
+ ourselves */
+
+ update_trustdom_cache();
}
/* now the trustdom cache should be available a DC could still