mirror of
https://github.com/samba-team/samba.git
synced 2025-07-30 19:42:05 +03:00
python/samba/provision: remove use of str() func for binary data
Python 2 code works with str(policy["nTSecurityDescriptor"]) however this cannot work with Python 3. One could argue even the str method doesn't make sense at all (returning a string) for data. 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
683d51fb5c
commit
84c890b244
@ -1619,7 +1619,7 @@ def set_gpos_acl(sysvol, dnsdomain, domainsid, domaindn, samdb, lp, use_ntvfs, p
|
||||
|
||||
for policy in res:
|
||||
acl = ndr_unpack(security.descriptor,
|
||||
str(policy["nTSecurityDescriptor"])).as_sddl()
|
||||
policy["nTSecurityDescriptor"][0]).as_sddl()
|
||||
policy_path = getpolicypath(sysvol, dnsdomain, str(policy["cn"]))
|
||||
set_dir_acl(policy_path, dsacl2fsacl(acl, domainsid), lp,
|
||||
str(domainsid), use_ntvfs,
|
||||
@ -1793,7 +1793,7 @@ def check_gpos_acl(sysvol, dnsdomain, domainsid, domaindn, samdb, lp,
|
||||
|
||||
for policy in res:
|
||||
acl = ndr_unpack(security.descriptor,
|
||||
str(policy["nTSecurityDescriptor"])).as_sddl()
|
||||
policy["nTSecurityDescriptor"][0]).as_sddl()
|
||||
policy_path = getpolicypath(sysvol, dnsdomain, str(policy["cn"]))
|
||||
check_dir_acl(policy_path, dsacl2fsacl(acl, domainsid), lp,
|
||||
domainsid, direct_db_access)
|
||||
|
Reference in New Issue
Block a user