mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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
This commit is contained in:
@@ -593,6 +593,12 @@ class TrustDomainInstance(object):
|
|||||||
info.trust_type = lsa.LSA_TRUST_TYPE_UPLEVEL
|
info.trust_type = lsa.LSA_TRUST_TYPE_UPLEVEL
|
||||||
info.trust_attributes = lsa.LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE
|
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:
|
try:
|
||||||
dname = lsa.String()
|
dname = lsa.String()
|
||||||
dname.string = another_domain.info['dns_domain']
|
dname.string = another_domain.info['dns_domain']
|
||||||
|
|||||||
Reference in New Issue
Block a user