summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorRonnie Sahlberg <lsahlber@redhat.com>2021-07-28 08:38:29 +0200
committerSteve French <stfrench@microsoft.com>2021-07-29 00:03:24 +0200
commitb946dbcfa4df80ec81b442964e07ad37000cc059 (patch)
tree80f83ae896170fe41e7f252047b4d09eeeceb2eb /fs
parentsmb3: rc uninitialized in one fallocate path (diff)
downloadlinux-b946dbcfa4df80ec81b442964e07ad37000cc059.tar.xz
linux-b946dbcfa4df80ec81b442964e07ad37000cc059.zip
cifs: add missing parsing of backupuid
We lost parsing of backupuid in the switch to new mount API. Add it back. Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> Reviewed-by: Shyam Prasad N <sprasad@microsoft.com> Cc: <stable@vger.kernel.org> # v5.11+ Reported-by: Xiaoli Feng <xifeng@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/fs_context.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/cifs/fs_context.c b/fs/cifs/fs_context.c
index 9a59d7ff9a11..eed59bc1d913 100644
--- a/fs/cifs/fs_context.c
+++ b/fs/cifs/fs_context.c
@@ -925,6 +925,13 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
ctx->cred_uid = uid;
ctx->cruid_specified = true;
break;
+ case Opt_backupuid:
+ uid = make_kuid(current_user_ns(), result.uint_32);
+ if (!uid_valid(uid))
+ goto cifs_parse_mount_err;
+ ctx->backupuid = uid;
+ ctx->backupuid_specified = true;
+ break;
case Opt_backupgid:
gid = make_kgid(current_user_ns(), result.uint_32);
if (!gid_valid(gid))