From: Andrew Bartlett Date: Thu, 30 Mar 2023 01:29:22 +0000 (+0000) Subject: s4-scripting/devel: Fix str() vs bytes() issue in repl_cleartext_pwd.py X-Git-Tag: talloc-2.4.2~669 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4ec50d91097dd2467411b1150808ea62652696a3;p=thirdparty%2Fsamba.git s4-scripting/devel: Fix str() vs bytes() issue in repl_cleartext_pwd.py Signed-off-by: Andrew Bartlett Reviewed-by: Reviewed-by: Joseph Sutton --- diff --git a/source4/scripting/devel/repl_cleartext_pwd.py b/source4/scripting/devel/repl_cleartext_pwd.py index e6b8ba615f1..7cb0af29c0b 100755 --- a/source4/scripting/devel/repl_cleartext_pwd.py +++ b/source4/scripting/devel/repl_cleartext_pwd.py @@ -392,13 +392,14 @@ if __name__ == "__main__": # uint32_t utdv_blob_ofs store_hdr_len = 7 * 4 dn_ofs = store_hdr_len - hwm_ofs = dn_ofs + len(dn) + dn_bytes = dn.encode('utf8') + hwm_ofs = dn_ofs + len(dn_bytes) utdv_ofs = hwm_ofs + len(store_hwm_blob) store_blob = struct.pack("