1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-09 00:23:50 +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:
Noel Power
2018-10-05 15:10:52 +01:00
committed by Andrew Bartlett
parent 60e7aa86d8
commit b142e28e35
2 changed files with 4 additions and 4 deletions

View File

@@ -236,7 +236,7 @@ def find_provision_key_parameters(samdb, secretsdb, idmapdb, paths, smbconf,
names.dnsdomaindn = None
for i in range(0, len(names.ncs)):
nc = names.ncs[i]
nc = str(names.ncs[i])
dnsforestdn = "DC=ForestDnsZones,%s" % (str(names.rootdn))
if nc == dnsforestdn:
@@ -307,8 +307,8 @@ def find_provision_key_parameters(samdb, secretsdb, idmapdb, paths, smbconf,
attrs=["xidNumber", "type"])
if len(res9) != 1:
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":
names.root_gid = res9[0]["xidNumber"][0]
if str(res9[0]["type"][0]) == "ID_TYPE_BOTH":
names.root_gid = int(res9[0]["xidNumber"][0])
else:
names.root_gid = pwd.getpwuid(int(res9[0]["xidNumber"][0])).pw_gid

View File

@@ -1387,7 +1387,7 @@ def backup_provision(samdb, paths, dir, only_db):
scope=ldb.SCOPE_BASE,
attrs=["backendStore"])
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: