From f85f6f89f128882d96ba0613dc7647f00100e8d3 Mon Sep 17 00:00:00 2001 From: Joseph Sutton Date: Mon, 11 Apr 2022 11:50:53 +1200 Subject: [PATCH] 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 --- python/samba/netcmd/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.34.1