1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-06 08:59:08 +03:00

r26566: Fix member provision when using python.

(This used to be commit e5573283df)
This commit is contained in:
Jelmer Vernooij
2007-12-22 05:11:21 -06:00
committed by Stefan Metzmacher
parent 249cc734ce
commit f053e385ff

View File

@ -729,17 +729,17 @@ def provision(lp, setup_dir, message, blank, paths, session_info,
message("Please install the phpLDAPadmin configuration located at %s into /etc/phpldapadmin/config.php" % paths.phpldapadminconfig)
samdb = SamDB(paths.samdb, session_info=session_info,
credentials=credentials, lp=lp)
domainguid = samdb.searchone(Dn(samdb, domaindn), "objectGUID")
assert isinstance(domainguid, str)
hostguid = samdb.searchone(Dn(samdb, domaindn), "objectGUID",
expression="(&(objectClass=computer)(cn=%s))" % hostname,
scope=SCOPE_SUBTREE)
assert isinstance(hostguid, str)
if lp.get("server role") == "domain controller":
samdb = SamDB(paths.samdb, session_info=session_info,
credentials=credentials, lp=lp)
domainguid = samdb.searchone(Dn(samdb, domaindn), "objectGUID")
assert isinstance(domainguid, str)
hostguid = samdb.searchone(Dn(samdb, domaindn), "objectGUID",
expression="(&(objectClass=computer)(cn=%s))" % hostname,
scope=SCOPE_SUBTREE)
assert isinstance(hostguid, str)
message("Setting up DNS zone: %s" % dnsdomain)
create_zone_file(paths.dns, setup_path, samdb,
hostname=hostname, hostip=hostip, dnsdomain=dnsdomain,