diff options
author | Martin Kosek <mkosek@redhat.com> | 2013-01-11 16:33:43 +0100 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2013-02-13 13:05:04 +0100 |
commit | 4c4418fb9e9c2cf4fff8dec59b6d8fcdb05ea706 (patch) | |
tree | ef37237acb8407684a2d7dccbbcd25d6a099e383 | |
parent | 45c0dd7448caeb86bcdf3edf624ac15efbbf2ac2 (diff) | |
download | freeipa-4c4418fb9e9c2cf4fff8dec59b6d8fcdb05ea706.tar.gz freeipa-4c4418fb9e9c2cf4fff8dec59b6d8fcdb05ea706.tar.xz freeipa-4c4418fb9e9c2cf4fff8dec59b6d8fcdb05ea706.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
-rw-r--r-- | ipaserver/dcerpc.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ipaserver/dcerpc.py b/ipaserver/dcerpc.py index bff435f71..384044437 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'] |