1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-16 00:23:52 +03:00

python:join: avoid useless use of py2-compat string_to_byte_array

This was a workaround for the migration to Python 3, but is now just
extra work for the computer and cognitive load for us.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall
2024-06-12 11:19:55 +12:00
committed by Andrew Bartlett
parent 46933bc25d
commit 3b349c29b5

View File

@@ -20,7 +20,7 @@
from samba.auth import system_session
from samba.samdb import SamDB
from samba import gensec, Ldb, drs_utils, arcfour_encrypt, string_to_byte_array
from samba import gensec, Ldb, drs_utils, arcfour_encrypt
import ldb
import samba
import uuid
@@ -1407,7 +1407,7 @@ class DCJoinContext(object):
except RuntimeError:
pass
password_blob = string_to_byte_array(ctx.trustdom_pass.encode('utf-16-le'))
password_blob = list(ctx.trustdom_pass.encode('utf-16-le'))
clear_value = drsblobs.AuthInfoClear()
clear_value.size = len(password_blob)
@@ -1443,7 +1443,7 @@ class DCJoinContext(object):
auth_blob = lsa.DATA_BUF2()
auth_blob.size = len(encrypted_trustpass)
auth_blob.data = string_to_byte_array(encrypted_trustpass)
auth_blob.data = list(encrypted_trustpass)
auth_info = lsa.TrustDomainInfoAuthInfoInternal()
auth_info.auth_blob = auth_blob