linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shyam Prasad N <nspmangalore@gmail.com>
To: Ronnie Sahlberg <lsahlber@redhat.com>
Cc: linux-cifs <linux-cifs@vger.kernel.org>,
	Steve French <smfrench@gmail.com>
Subject: Re: [PATCH] cifs: add missing parsing of backupuid
Date: Wed, 28 Jul 2021 20:58:23 +0530	[thread overview]
Message-ID: <CANT5p=p2=5wcATX6rhLcCVGAAHiVOJhV4PKpPL9A1mZtDogfgA@mail.gmail.com> (raw)
In-Reply-To: <20210728063829.15099-1-lsahlber@redhat.com>

On Wed, Jul 28, 2021 at 12:08 PM Ronnie Sahlberg <lsahlber@redhat.com> wrote:
>
> We lost parsing of backupuid in the switch to new mount API.
> Add it back.
>
> Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
> ---
>  fs/cifs/fs_context.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> 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))
> --
> 2.30.2
>

Looks good to me.
Might also be worthwhile to check if we missed any other mount option?

-- 
Regards,
Shyam

  reply	other threads:[~2021-07-28 15:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-28  6:38 Ronnie Sahlberg
2021-07-28 15:28 ` Shyam Prasad N [this message]
2021-07-28 20:59 Ronnie Sahlberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANT5p=p2=5wcATX6rhLcCVGAAHiVOJhV4PKpPL9A1mZtDogfgA@mail.gmail.com' \
    --to=nspmangalore@gmail.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=lsahlber@redhat.com \
    --cc=smfrench@gmail.com \
    --subject='Re: [PATCH] cifs: add missing parsing of backupuid' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).