mirror of
https://github.com/samba-team/samba.git
synced 2025-07-15 16:59:09 +03:00
python/samba: misc use of str for ldb.bytes
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
17728c2f53
commit
e5cac2b843
@ -108,7 +108,7 @@ class LDAPBase(object):
|
||||
assert len(res) > 0
|
||||
srv = []
|
||||
for x in res:
|
||||
srv.append(x["cn"][0])
|
||||
srv.append(str(x["cn"][0]))
|
||||
return srv
|
||||
|
||||
def find_netbios(self):
|
||||
@ -259,7 +259,7 @@ class LDAPBase(object):
|
||||
expression="(objectSid=*)", scope=SCOPE_SUBTREE, attrs=["objectSid", "sAMAccountName"])
|
||||
for item in res:
|
||||
try:
|
||||
self.sid_map["%s" % ndr_unpack(security.dom_sid, item["objectSid"][0])] = item["sAMAccountName"][0]
|
||||
self.sid_map["%s" % ndr_unpack(security.dom_sid, item["objectSid"][0])] = str(item["sAMAccountName"][0])
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
|
Reference in New Issue
Block a user