From: Joseph Sutton Date: Sun, 10 Apr 2022 23:50:53 +0000 (+1200) Subject: samba-tool user: Consistently return a tuple X-Git-Tag: talloc-2.3.4~264 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f85f6f89f128882d96ba0613dc7647f00100e8d3;p=thirdparty%2Fsamba.git samba-tool user: Consistently return a tuple We would get an error when get_userPassword_hash() returned None, as get_virtual_crypt_value() would try to unpack the result as a 2-element tuple. Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/netcmd/user.py b/python/samba/netcmd/user.py index 7956d129861..70be85c406a 100644 --- a/python/samba/netcmd/user.py +++ b/python/samba/netcmd/user.py @@ -1478,7 +1478,7 @@ class GetPasswordCommand(Command): # the user password hashes. This indicates that password has been # changed without updating the supplemental credentials. if unicodePwd != bytearray(up.current_nt_hash.hash): - return None + return None, None scheme_prefix = "$%d$" % algorithm prefix = scheme_prefix