summaryrefslogtreecommitdiff
path: root/fs/cifs/fs_context.c
diff options
context:
space:
mode:
authorSteve French <stfrench@microsoft.com>2020-12-17 01:26:35 +0300
committerSteve French <stfrench@microsoft.com>2020-12-17 02:02:34 +0300
commit31f6551ad75608d9c71fd4d3548c33f1abc52093 (patch)
treef17ee72e5f51a1627eaeac22b5a0cfda14b72a1a /fs/cifs/fs_context.c
parent27cf94853e6d2b5c981ed4d9f798912027352584 (diff)
downloadlinux-31f6551ad75608d9c71fd4d3548c33f1abc52093.tar.xz
cifs: handle "guest" mount parameter
With the new mount API it can not handle empty strings for mount parms ("guest" is mapped in userspace mount helper to "user=") so we have to special case it as we do for the password mount parm. Signed-off-by: Steve French <stfrench@microsoft.com> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Diffstat (limited to 'fs/cifs/fs_context.c')
-rw-r--r--fs/cifs/fs_context.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
index 29b99e68ec80..734b30db580f 100644
--- a/fs/cifs/fs_context.c
+++ b/fs/cifs/fs_context.c
@@ -733,6 +733,9 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
if (!strcmp("pass", param->key) || !strcmp("password", param->key)) {
skip_parsing = true;
opt = Opt_pass;
+ } else if (!strcmp("user", param->key) || !strcmp("username", param->key)) {
+ skip_parsing = true;
+ opt = Opt_user;
}
}
@@ -1250,6 +1253,7 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
ctx->rdma = true;
break;
}
+ /* case Opt_ignore: - is ignored as expected ... */
return 0;