From 07019c30adff0c17e6169aed474fc2978d5392d3 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Sat, 14 Nov 2009 01:12:22 +0100 Subject: s3:is_trusted_domain: shortcut if domain name is NULL or empty This saves some roundtrips to LDAP in an ldapsm setup. Michael (cherry picked from commit 0aa5a60d3033fddd652eb4ea89abdf97db912df3) Signed-off-by: Stefan Metzmacher (cherry picked from commit 85d8565e8c5a290698d0f0599f851dc0bee50245) --- source3/auth/auth_util.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index b743c121386..7754984a07b 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -2176,6 +2176,10 @@ bool is_trusted_domain(const char* dom_name) if ( lp_server_role() == ROLE_STANDALONE ) return False; + if (dom_name == NULL || dom_name[0] == '\0') { + return false; + } + /* if we are a DC, then check for a direct trust relationships */ if ( IS_DC ) { -- cgit v1.2.1