Skip to content

Commit 8abd728

Browse files
committed
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
2 parents cd479d9 + 270d73e commit 8abd728

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fs/smb/client/fs_context.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,8 @@ cifs_parse_security_flavors(struct fs_context *fc, char *value, struct smb3_fs_c
231231
break;
232232
case Opt_sec_none:
233233
ctx->nullauth = 1;
234+
kfree(ctx->username);
235+
ctx->username = NULL;
234236
break;
235237
default:
236238
cifs_errorf(fc, "bad security option: %s\n", value);
@@ -1201,6 +1203,8 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
12011203
case Opt_user:
12021204
kfree(ctx->username);
12031205
ctx->username = NULL;
1206+
if (ctx->nullauth)
1207+
break;
12041208
if (strlen(param->string) == 0) {
12051209
/* null user, ie. anonymous authentication */
12061210
ctx->nullauth = 1;

0 commit comments

Comments
 (0)