From b9ec2da1d16401a5abb30d826784fc35c2d27852 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Sat, 14 Nov 2009 01:21:42 +0100 Subject: [PATCH] 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 (cherry picked from commit dc3a90cf21813526854c12db126d08ebf32f8ae5) Signed-off-by: Stefan Metzmacher (cherry picked from commit c48405ed0ab0e3c3a0c1472e3bf874a4a64c0261) --- 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 7754984a07b..89aa4a3c38f 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -2180,6 +2180,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 ) { -- 2.11.4.GIT