summaryrefslogtreecommitdiffstats
path: root/ipaserver
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2013-01-11 16:33:43 +0100
committerMartin Kosek <mkosek@redhat.com>2013-02-13 13:05:16 +0100
commit8bbc4c5ff4b5a3c9bb99241a213bb52deb418212 (patch)
treef928a41f9f884d6f9d55d0a590cd9c640cef3a53 /ipaserver
parent8fc98f3a493db45f4661f09aab6e747086ac70e8 (diff)
downloadfreeipa.git-8bbc4c5ff4b5a3c9bb99241a213bb52deb418212.tar.gz
freeipa.git-8bbc4c5ff4b5a3c9bb99241a213bb52deb418212.tar.xz
freeipa.git-8bbc4c5ff4b5a3c9bb99241a213bb52deb418212.zip
Test NetBIOS name clash before creating a trust
Give a clear message about what is wrong with current Trust settings before letting AD to return a confusing error message. https://fedorahosted.org/freeipa/ticket/3193
Diffstat (limited to 'ipaserver')
-rw-r--r--ipaserver/dcerpc.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ipaserver/dcerpc.py b/ipaserver/dcerpc.py
index bff435f7..38404443 100644
--- a/ipaserver/dcerpc.py
+++ b/ipaserver/dcerpc.py
@@ -593,6 +593,12 @@ class TrustDomainInstance(object):
info.trust_type = lsa.LSA_TRUST_TYPE_UPLEVEL
info.trust_attributes = lsa.LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE
+ if self.info['name'] == info.netbios_name.string:
+ # Check that NetBIOS names do not clash
+ raise errors.ValidationError(name=u'AD Trust Setup',
+ error=_('the IPA server and the remote domain cannot share the same '
+ 'NetBIOS name: %s') % self.info['name'])
+
try:
dname = lsa.String()
dname.string = another_domain.info['dns_domain']