Commit 8abd7287 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag '6.5-rc6-smb3-client-fix' of git://git.samba.org/sfrench/cifs-2.6

Pull smb client fix from Steve French:
 "A small SMB mount option fix, also for stable"

* tag '6.5-rc6-smb3-client-fix' of git://git.samba.org/sfrench/cifs-2.6:
  smb: client: fix null auth
parents cd479d9c 270d73e6
...@@ -231,6 +231,8 @@ cifs_parse_security_flavors(struct fs_context *fc, char *value, struct smb3_fs_c ...@@ -231,6 +231,8 @@ cifs_parse_security_flavors(struct fs_context *fc, char *value, struct smb3_fs_c
break; break;
case Opt_sec_none: case Opt_sec_none:
ctx->nullauth = 1; ctx->nullauth = 1;
kfree(ctx->username);
ctx->username = NULL;
break; break;
default: default:
cifs_errorf(fc, "bad security option: %s\n", value); cifs_errorf(fc, "bad security option: %s\n", value);
...@@ -1201,6 +1203,8 @@ static int smb3_fs_context_parse_param(struct fs_context *fc, ...@@ -1201,6 +1203,8 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
case Opt_user: case Opt_user:
kfree(ctx->username); kfree(ctx->username);
ctx->username = NULL; ctx->username = NULL;
if (ctx->nullauth)
break;
if (strlen(param->string) == 0) { if (strlen(param->string) == 0) {
/* null user, ie. anonymous authentication */ /* null user, ie. anonymous authentication */
ctx->nullauth = 1; ctx->nullauth = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment