samba-tool domain claim: use secrets module for token
commit8650ba0a187d4c0a05fd4596570b940431338a27
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Fri, 2 Feb 2024 01:23:38 +0000 (2 14:23 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 29 Feb 2024 01:31:31 +0000 (29 01:31 +0000)
tree7381f09fbd408c08874510622b8f90eb463a8c4c
parent2908a6d67bca58c9de6991cbe312276408a34b7a
samba-tool domain claim: use secrets module for token

`binascii.hexlify(os.urandom(8)).decode()` was fine, but `os.urandom`
is OS specific and can theoretically block (says the documentation).

We will let Python's secrets module worry about such details.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/netcmd/domain/claim/claim_type.py