]> 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:28:30 +0000 (15:28 +0200)
commit7e8cffa4f85e6839335d75e6b47f918d90c1d194
treed5dd66ad438e465926f72add625285bb59b2d1da
parent9179aa27039af2e30bcb7a11330e2e6daa382307
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