From 144c23893ec580eed1a38b2fd577b4bd4ebf491d 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 --- source3/auth/auth_util.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/auth/auth_util.c') diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index 1d25e22202..512cae0dcb 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -2181,6 +2181,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