diff mbox series

[CIFS] handle "guest" mount parameter

Message ID CAH2r5mt6Mx+bv9V1YWg0JFJRSYSA+S0j0bi1cueachy1AEH0SA@mail.gmail.com
State New
Headers show
Series [CIFS] handle "guest" mount parameter | expand

Commit Message

Steve French Dec. 16, 2020, 10:31 p.m. UTC
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>
---
 fs/cifs/fs_context.c | 4 ++++
 1 file changed, 4 insertions(+)


@@ -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;
diff mbox series

Patch

diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
index 29b99e68ec80..24b7f8d0a51a 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;
  }
  }