]> git.ipfire.org Git - thirdparty/samba.git/commit
samba-tool user: hashlib.sha1 is always present
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 11 Dec 2024 02:56:20 +0000 (15:56 +1300)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 20 Dec 2024 07:04:31 +0000 (07:04 +0000)
commit4af4dd8135e8edbe2a16cfdfc7ded8c145c82e98
treedd7450cbb9105421cbf7b9f688823587e4a63ced
parent405187d2ef4920a9a284649c9c3287f5844d5180
samba-tool user: hashlib.sha1 is always present

We maybe thought we were checking that sha1 was in hashlib, but we were
only checking that hashlib is in the Python library (`hashlib.sha1()`
would not raise ImportError).

The documentation says hashlib always contains sha1 -- if that
changes, it is better we know by failing noisily with the import error
at the top of the file.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15756

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
python/samba/netcmd/user/readpasswords/common.py