diff options
author | Michael Adam <obnox@samba.org> | 2009-11-14 01:12:22 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2010-02-15 14:46:54 +0100 |
commit | 07019c30adff0c17e6169aed474fc2978d5392d3 (patch) | |
tree | cce4692ee8c73466371a325f6fd9430c4c7137ee | |
parent | 17ef5e9d21eb0873e9b4ac8c05429efc1f0bf957 (diff) | |
download | samba-07019c30adff0c17e6169aed474fc2978d5392d3.tar.gz |
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 <metze@samba.org>
(cherry picked from commit 85d8565e8c5a290698d0f0599f851dc0bee50245)
-rw-r--r-- | source3/auth/auth_util.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 ) { |