]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
smb3: fix broken reconnect when password changing on the server by allowing password...
authorSteve French <stfrench@microsoft.com>
Thu, 4 Apr 2024 23:06:56 +0000 (18:06 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 May 2024 10:02:17 +0000 (12:02 +0200)
commit08bedfbc1b5071c14cd18580c938a5212d01ea70
treef8792aa1d75c4c6480d7c67ec4ba0a88962e4b10
parent82f9e213b124a7d2bb5b16ea35d570260ef467e0
smb3: fix broken reconnect when password changing on the server by allowing password rotation

[ Upstream commit 35f834265e0dc78b003aa0d1af65cafb89666b76 ]

There are various use cases that are becoming more common in which password
changes are scheduled on a server(s) periodically but the clients connected
to this server need to stay connected (even in the face of brief network
reconnects) due to mounts which can not be easily unmounted and mounted at
will, and servers that do password rotation do not always have the ability
to tell the clients exactly when to the new password will be effective,
so add support for an alt password ("password2=") on mount (and also
remount) so that we can anticipate the upcoming change to the server
without risking breaking existing mounts.

An alternative would have been to use the kernel keyring for this but the
processes doing the reconnect do not have access to the keyring but do
have access to the ses structure.

Reviewed-by: Bharath SM <bharathsm@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/smb/client/cifsglob.h
fs/smb/client/connect.c
fs/smb/client/fs_context.c
fs/smb/client/fs_context.h
fs/smb/client/misc.c
fs/smb/client/smb2pdu.c