diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-12-04 12:34:44 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-12-08 14:15:37 +1100 |
commit | 87e2d68305570ab024f801d0c063e07f076cc46f (patch) | |
tree | 9add2f61a7c5e80c8b84c0510c07240b92efdc36 /source4/scripting/python | |
parent | 994bcf35d2c547edc7f567a0f1b6e4db73a3ee73 (diff) | |
download | samba-87e2d68305570ab024f801d0c063e07f076cc46f.tar.gz samba-87e2d68305570ab024f801d0c063e07f076cc46f.tar.bz2 samba-87e2d68305570ab024f801d0c063e07f076cc46f.zip |
s4-provision Add an invalid names check for 'domain == netbiosname'
(This is also invalid)
Andrew Bartlett
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/samba/provision/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/provision/__init__.py b/source4/scripting/python/samba/provision/__init__.py index 7f1969924a..3e402b2fd5 100644 --- a/source4/scripting/python/samba/provision/__init__.py +++ b/source4/scripting/python/samba/provision/__init__.py @@ -515,6 +515,9 @@ def guess_names(lp=None, hostname=None, domain=None, dnsdomain=None, if domaindn is None: domaindn = "DC=" + dnsdomain.replace(".", ",DC=") + + if domain == netbiosname: + raise ProvisioningError("guess_names: Domain '%s' must not be equal to short host name '%s'!" % (domain, netbiosname)) else: domain = netbiosname if domaindn is None: @@ -525,7 +528,7 @@ def guess_names(lp=None, hostname=None, domain=None, dnsdomain=None, if hostname.upper() == realm: raise ProvisioningError("guess_names: Realm '%s' must not be equal to hostname '%s'!" % (realm, hostname)) - if netbiosname == realm: + if netbiosname.upper() == realm: raise ProvisioningError("guess_names: Realm '%s' must not be equal to netbios hostname '%s'!" % (realm, netbiosname)) if domain == realm: raise ProvisioningError("guess_names: Realm '%s' must not be equal to short domain name '%s'!" % (realm, domain)) |