]> git.baikalelectronics.ru Git - kernel.git/commitdiff
cifs: add missing parsing of backupuid
authorRonnie Sahlberg <lsahlber@redhat.com>
Wed, 28 Jul 2021 06:38:29 +0000 (16:38 +1000)
committerSteve French <stfrench@microsoft.com>
Wed, 28 Jul 2021 22:03:24 +0000 (17:03 -0500)
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>
fs/cifs/fs_context.c

index 9a59d7ff9a11bf7830b16ad21cf96f73959ce945..eed59bc1d913001e32705eae7546811ad089e629 100644 (file)
@@ -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))