]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cifs: allow changing password during remount
authorSteve French <stfrench@microsoft.com>
Tue, 13 Feb 2024 06:40:01 +0000 (00:40 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2024 13:11:22 +0000 (15:11 +0200)
commite78308a6dcab1e53b38b8dd952e69c515cd324d7
tree703d63a95fba51a92aff00aa20c6908a963e9cb1
parent5f51dfa94fc67f0edf4a887b6bdb80d50d7cf5bc
cifs: allow changing password during remount

[ Upstream commit c1eb537bf4560b3ad4df606c266c665624f3b502 ]

There are cases where a session is disconnected and password has changed
on the server (or expired) for this user and this currently can not
be fixed without unmount and mounting again.  This patch allows
remount to change the password (for the non Kerberos case, Kerberos
ticket refresh is handled differently) when the session is disconnected
and the user can not reconnect due to still using old password.

Future patches should also allow us to setup the keyring (cifscreds)
to have an "alternate password" so we would be able to change
the password before the session drops (without the risk of races
between when the password changes and the disconnect occurs -
ie cases where the old password is still needed because the new
password has not fully rolled out to all servers yet).

Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/smb/client/cifs_debug.c
fs/smb/client/cifsglob.h
fs/smb/client/fs_context.c
fs/smb/client/smb2pdu.c