mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
scripting-provision: Do not enforce domain != realm if we are joining an existing domain
This will allow us users to join existing oddly named domains without objection from provision. Andrew Bartlett Reviewed-by: Matthieu Patou <mat@matws.net> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu Apr 11 10:41:02 CEST 2013 on sn-devel-104
This commit is contained in:
parent
7955bf473f
commit
f7756137e8
@ -561,7 +561,8 @@ def determine_netbios_name(hostname):
|
|||||||
|
|
||||||
def guess_names(lp=None, hostname=None, domain=None, dnsdomain=None,
|
def guess_names(lp=None, hostname=None, domain=None, dnsdomain=None,
|
||||||
serverrole=None, rootdn=None, domaindn=None, configdn=None,
|
serverrole=None, rootdn=None, domaindn=None, configdn=None,
|
||||||
schemadn=None, serverdn=None, sitename=None):
|
schemadn=None, serverdn=None, sitename=None,
|
||||||
|
domain_names_forced=False):
|
||||||
"""Guess configuration settings to use."""
|
"""Guess configuration settings to use."""
|
||||||
|
|
||||||
if hostname is None:
|
if hostname is None:
|
||||||
@ -624,8 +625,8 @@ def guess_names(lp=None, hostname=None, domain=None, dnsdomain=None,
|
|||||||
if hostname.upper() == realm:
|
if hostname.upper() == realm:
|
||||||
raise ProvisioningError("guess_names: Realm '%s' must not be equal to hostname '%s'!" % (realm, hostname))
|
raise ProvisioningError("guess_names: Realm '%s' must not be equal to hostname '%s'!" % (realm, hostname))
|
||||||
if netbiosname.upper() == realm:
|
if netbiosname.upper() == realm:
|
||||||
raise ProvisioningError("guess_names: Realm '%s' must not be equal to netbios hostname '%s'!" % (realm, netbiosname))
|
raise ProvisioningError("guess_names: Realm '%s' must not be equal to NetBIOS hostname '%s'!" % (realm, netbiosname))
|
||||||
if domain == realm:
|
if domain == realm and not domain_names_forced:
|
||||||
raise ProvisioningError("guess_names: Realm '%s' must not be equal to short domain name '%s'!" % (realm, domain))
|
raise ProvisioningError("guess_names: Realm '%s' must not be equal to short domain name '%s'!" % (realm, domain))
|
||||||
|
|
||||||
if rootdn is None:
|
if rootdn is None:
|
||||||
@ -1984,7 +1985,7 @@ def provision(logger, session_info, credentials, smbconf=None,
|
|||||||
names = guess_names(lp=lp, hostname=hostname, domain=domain,
|
names = guess_names(lp=lp, hostname=hostname, domain=domain,
|
||||||
dnsdomain=realm, serverrole=serverrole, domaindn=domaindn,
|
dnsdomain=realm, serverrole=serverrole, domaindn=domaindn,
|
||||||
configdn=configdn, schemadn=schemadn, serverdn=serverdn,
|
configdn=configdn, schemadn=schemadn, serverdn=serverdn,
|
||||||
sitename=sitename, rootdn=rootdn)
|
sitename=sitename, rootdn=rootdn, domain_names_forced=(samdb_fill == FILL_DRS))
|
||||||
paths = provision_paths_from_lp(lp, names.dnsdomain)
|
paths = provision_paths_from_lp(lp, names.dnsdomain)
|
||||||
|
|
||||||
paths.bind_gid = bind_gid
|
paths.bind_gid = bind_gid
|
||||||
|
Loading…
Reference in New Issue
Block a user