summaryrefslogtreecommitdiffstats
path: root/fs/smb/client/fs_context.h
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2024-04-04 18:06:56 -0500
committerSteve French <stfrench@microsoft.com>2024-04-11 16:03:48 -0500
commit35f834265e0dc78b003aa0d1af65cafb89666b76 (patch)
treed74cae8847f16de62f5b3e0e44832ee43b461156 /fs/smb/client/fs_context.h
parentc6ff459037b2e35450af2351037eac4c8aca1d6b (diff)
downloadlinux-stable-35f834265e0dc78b003aa0d1af65cafb89666b76.tar.gz
linux-stable-35f834265e0dc78b003aa0d1af65cafb89666b76.tar.bz2
linux-stable-35f834265e0dc78b003aa0d1af65cafb89666b76.zip
smb3: fix broken reconnect when password changing on the server by allowing password rotation
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>
Diffstat (limited to 'fs/smb/client/fs_context.h')
-rw-r--r--fs/smb/client/fs_context.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/smb/client/fs_context.h b/fs/smb/client/fs_context.h
index 8a35645e0b65..a947bddeba27 100644
--- a/fs/smb/client/fs_context.h
+++ b/fs/smb/client/fs_context.h
@@ -145,6 +145,7 @@ enum cifs_param {
Opt_source,
Opt_user,
Opt_pass,
+ Opt_pass2,
Opt_ip,
Opt_domain,
Opt_srcaddr,
@@ -177,6 +178,7 @@ struct smb3_fs_context {
char *username;
char *password;
+ char *password2;
char *domainname;
char *source;
char *server_hostname;