summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonnie Sahlberg <lsahlber@redhat.com>2021-07-28 16:38:29 +1000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-08-08 09:06:54 +0200
commit1ce09f0ae45586c7917cd80bea5817a546d6d936 (patch)
tree552fb8459a70ef4f298eec1f5d47640a0bb7b02a
parentcf5663d06bc367c433a6b32badc1a372163afbcf (diff)
downloadlinux-stable-1ce09f0ae45586c7917cd80bea5817a546d6d936.tar.gz
linux-stable-1ce09f0ae45586c7917cd80bea5817a546d6d936.tar.bz2
linux-stable-1ce09f0ae45586c7917cd80bea5817a546d6d936.zip
cifs: add missing parsing of backupuid
[ Upstream commit b946dbcfa4df80ec81b442964e07ad37000cc059 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
-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 553adfbcc22a..72742eb1df4a 100644
--- a/fs/cifs/fs_context.c
+++ b/fs/cifs/fs_context.c
@@ -918,6 +918,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))