mirror of
https://github.com/samba-team/samba.git
synced 2025-07-05 04:59:08 +03:00
s4:provision Prevent some invalid combinations of realm and domain
We don't do well (even just trying to create duplicate servicePrincipalName values) with some of these combinations, so kill it off early before the administrator thinks it's going to work. Andrew Bartlett
This commit is contained in:
@ -421,6 +421,15 @@ def guess_names(lp=None, hostname=None, domain=None, dnsdomain=None,
|
||||
if not valid_netbios_name(domain):
|
||||
raise InvalidNetbiosName(domain)
|
||||
|
||||
if netbiosname.upper() == realm.upper():
|
||||
raise Exception("realm %s must not be equal to netbios domain name %s", realm, netbiosname)
|
||||
|
||||
if hostname.upper() == realm.upper():
|
||||
raise Exception("realm %s must not be equal to hostname %s", realm, hostname)
|
||||
|
||||
if domain.upper() == realm.upper():
|
||||
raise Exception("realm %s must not be equal to domain name %s", realm, domain)
|
||||
|
||||
if rootdn is None:
|
||||
rootdn = domaindn
|
||||
|
||||
|
Reference in New Issue
Block a user