diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-05-08 20:21:51 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-05-08 20:21:51 +0200 |
commit | ed63ba15d7830c30077dbb33c94242be01e45a18 (patch) | |
tree | 8165313975d57f025e640d33768dbc31493ce5b7 /fs/smb/client/fs_context.c | |
parent | scripts/spdxcheck: Add count of missing files to stats output (diff) | |
parent | Linux 6.9-rc7 (diff) | |
download | linux-ed63ba15d7830c30077dbb33c94242be01e45a18.tar.xz linux-ed63ba15d7830c30077dbb33c94242be01e45a18.zip |
Merge 6.9-rc7 into char-misc-testing
We need the char-misc changes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/smb/client/fs_context.c')
-rw-r--r-- | fs/smb/client/fs_context.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/smb/client/fs_context.c b/fs/smb/client/fs_context.c index 6c727d8c31e8..3bbac925d076 100644 --- a/fs/smb/client/fs_context.c +++ b/fs/smb/client/fs_context.c @@ -748,6 +748,16 @@ static int smb3_fs_context_validate(struct fs_context *fc) /* set the port that we got earlier */ cifs_set_port((struct sockaddr *)&ctx->dstaddr, ctx->port); + if (ctx->uid_specified && !ctx->forceuid_specified) { + ctx->override_uid = 1; + pr_notice("enabling forceuid mount option implicitly because uid= option is specified\n"); + } + + if (ctx->gid_specified && !ctx->forcegid_specified) { + ctx->override_gid = 1; + pr_notice("enabling forcegid mount option implicitly because gid= option is specified\n"); + } + if (ctx->override_uid && !ctx->uid_specified) { ctx->override_uid = 0; pr_notice("ignoring forceuid mount option specified with no uid= option\n"); @@ -1019,12 +1029,14 @@ static int smb3_fs_context_parse_param(struct fs_context *fc, ctx->override_uid = 0; else ctx->override_uid = 1; + ctx->forceuid_specified = true; break; case Opt_forcegid: if (result.negated) ctx->override_gid = 0; else ctx->override_gid = 1; + ctx->forcegid_specified = true; break; case Opt_perm: if (result.negated) |