summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-11-14 01:21:42 +0100
committerKarolin Seeger <kseeger@samba.org>2010-02-15 14:46:54 +0100
commitb9ec2da1d16401a5abb30d826784fc35c2d27852 (patch)
tree4a0b3c05fbdfa18a0bb1f76bc73ea65aa4091885
parent07019c30adff0c17e6169aed474fc2978d5392d3 (diff)
downloadsamba-b9ec2da1d16401a5abb30d826784fc35c2d27852.tar.gz
samba-b9ec2da1d16401a5abb30d826784fc35c2d27852.tar.xz
samba-b9ec2da1d16401a5abb30d826784fc35c2d27852.zip
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 <metze@samba.org> (cherry picked from commit c48405ed0ab0e3c3a0c1472e3bf874a4a64c0261)
-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 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 ) {