mirror of
https://github.com/samba-team/samba.git
synced 2025-12-14 20:23:54 +03:00
python/samba: PY3 fix samba4.blackbox.upgradeprovision.release-4-0-0
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
committed by
Andrew Bartlett
parent
60e7aa86d8
commit
b142e28e35
@@ -236,7 +236,7 @@ def find_provision_key_parameters(samdb, secretsdb, idmapdb, paths, smbconf,
|
|||||||
names.dnsdomaindn = None
|
names.dnsdomaindn = None
|
||||||
|
|
||||||
for i in range(0, len(names.ncs)):
|
for i in range(0, len(names.ncs)):
|
||||||
nc = names.ncs[i]
|
nc = str(names.ncs[i])
|
||||||
|
|
||||||
dnsforestdn = "DC=ForestDnsZones,%s" % (str(names.rootdn))
|
dnsforestdn = "DC=ForestDnsZones,%s" % (str(names.rootdn))
|
||||||
if nc == dnsforestdn:
|
if nc == dnsforestdn:
|
||||||
@@ -307,8 +307,8 @@ def find_provision_key_parameters(samdb, secretsdb, idmapdb, paths, smbconf,
|
|||||||
attrs=["xidNumber", "type"])
|
attrs=["xidNumber", "type"])
|
||||||
if len(res9) != 1:
|
if len(res9) != 1:
|
||||||
raise ProvisioningError("Unable to find uid/gid for Domain Admins rid (%s-%s" % (str(names.domainsid), security.DOMAIN_RID_ADMINISTRATOR))
|
raise ProvisioningError("Unable to find uid/gid for Domain Admins rid (%s-%s" % (str(names.domainsid), security.DOMAIN_RID_ADMINISTRATOR))
|
||||||
if res9[0]["type"][0] == "ID_TYPE_BOTH":
|
if str(res9[0]["type"][0]) == "ID_TYPE_BOTH":
|
||||||
names.root_gid = res9[0]["xidNumber"][0]
|
names.root_gid = int(res9[0]["xidNumber"][0])
|
||||||
else:
|
else:
|
||||||
names.root_gid = pwd.getpwuid(int(res9[0]["xidNumber"][0])).pw_gid
|
names.root_gid = pwd.getpwuid(int(res9[0]["xidNumber"][0])).pw_gid
|
||||||
|
|
||||||
|
|||||||
@@ -1387,7 +1387,7 @@ def backup_provision(samdb, paths, dir, only_db):
|
|||||||
scope=ldb.SCOPE_BASE,
|
scope=ldb.SCOPE_BASE,
|
||||||
attrs=["backendStore"])
|
attrs=["backendStore"])
|
||||||
if "backendStore" in res[0]:
|
if "backendStore" in res[0]:
|
||||||
backend_store = res[0]["backendStore"][0]
|
backend_store = str(res[0]["backendStore"][0])
|
||||||
|
|
||||||
|
|
||||||
if paths.sysvol and not only_db:
|
if paths.sysvol and not only_db:
|
||||||
|
|||||||
Reference in New Issue
Block a user