summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-11-14 01:12:22 +0100
committerMichael Adam <obnox@samba.org>2009-11-14 01:28:57 +0100
commit144c23893ec580eed1a38b2fd577b4bd4ebf491d (patch)
tree80bcfe5847f84e86f0f3e3a1710e8ba307f288db /source3/auth
parent7e418bf736a8ba9f33cd3b2125d8fcae51d641bd (diff)
downloadsamba-144c23893ec580eed1a38b2fd577b4bd4ebf491d.tar.gz
samba-144c23893ec580eed1a38b2fd577b4bd4ebf491d.tar.bz2
samba-144c23893ec580eed1a38b2fd577b4bd4ebf491d.zip
s3:is_trusted_domain: shortcut if domain name is NULL or empty
This saves some roundtrips to LDAP in an ldapsm setup. Michael
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_util.c4
1 files changed, 4 insertions, 0 deletions
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 ) {