]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
python:key_credential_link: old python compatibility
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Tue, 12 Aug 2025 22:58:36 +0000 (10:58 +1200)
committerDouglas Bagnall <dbagnall@samba.org>
Wed, 13 Aug 2025 02:53:44 +0000 (02:53 +0000)
int.to_bytes assumed these defaults in recent versions

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
python/samba/key_credential_link.py

index 2ef5e00cbff5626340dd323607deaf18862cfa26..2ff17da44da19fad8ae6243bef70364aac292a8a 100644 (file)
@@ -187,7 +187,7 @@ def create_key_credential_link(samdb: SamDB,
 
     # always KEY_USAGE_NGC
     kcl_key_usage = kcl_entry_bytes(keycredlink.KeyUsage,
-                                    keycredlink.KEY_USAGE_NGC.to_bytes())
+                                    keycredlink.KEY_USAGE_NGC.to_bytes(1, byteorder='big'))
 
     # nttime for now
     kcl_creation = kcl_entry_bytes(keycredlink.KeyCreationTime,