From 5084d49052f47626b61e53add818fefaacc101b0 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 3 Jun 2005 15:42:03 +0000 Subject: r7243: Don't look at gencache.tdb for the trusted domains if winbind is around. Volker (This used to be commit 94acb93f57b963bf137c6ddd644a147f4d0b5175) --- source3/auth/auth_util.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'source3/auth/auth_util.c') 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 -- cgit