From 2e3d9abeafebffa6ff1c7b3de80525cd5f6deb49 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Sat, 14 Nov 2009 01:21:42 +0100 Subject: s3:is_trusted_domain: shortcut if domain name == global_sam_name A domain can't have a trust with itself. This saves some roundtrips to the ldap server for ldapsam. 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 512cae0dcb..118f41c35b 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -2185,6 +2185,10 @@ bool is_trusted_domain(const char* dom_name) return false; } + if (strequal(dom_name, get_global_sam_name())) { + return false; + } + /* if we are a DC, then check for a direct trust relationships */ if ( IS_DC ) { -- cgit