linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve French <smfrench@gmail.com>
To: Ronnie Sahlberg <lsahlber@redhat.com>
Cc: linux-cifs <linux-cifs@vger.kernel.org>
Subject: Re: [PATCH] cifs: Do not use the original cruid when following DFS links for multiuser mounts
Date: Mon, 12 Jul 2021 23:58:55 -0500	[thread overview]
Message-ID: <CAH2r5mu3VWp1PA=87sw_eWSbx+UdQ3utBBrpd1ESiYM24YKp+g@mail.gmail.com> (raw)
In-Reply-To: <20210713022259.2968733-1-lsahlber@redhat.com>

tentatively merged into cifs-2.6.git for-next pending testing

On Mon, Jul 12, 2021 at 9:23 PM Ronnie Sahlberg <lsahlber@redhat.com> wrote:
>
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=213565
>
> cruid should only be used for the initial mount and after this we should use the current
> users credentials.
> Ignore the original cruid mount argument when creating a new context for a multiuser mount
> following a DFS link.
>
> Fixes: 24e0a1eff9e2 ("cifs: switch to new mount api")
> Cc: stable@vger.kernel.org # 5.11
> Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
> ---
>  fs/cifs/cifs_dfs_ref.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/fs/cifs/cifs_dfs_ref.c b/fs/cifs/cifs_dfs_ref.c
> index ec57cdb1590f..5c9a8778c99d 100644
> --- a/fs/cifs/cifs_dfs_ref.c
> +++ b/fs/cifs/cifs_dfs_ref.c
> @@ -208,6 +208,10 @@ char *cifs_compose_mount_options(const char *sb_mountdata,
>                 else
>                         noff = tkn_e - (sb_mountdata + off) + 1;
>
> +               if (strncasecmp(sb_mountdata + off, "cruid=", 6) == 0) {
> +                       off += noff;
> +                       continue;
> +               }
>                 if (strncasecmp(sb_mountdata + off, "unc=", 4) == 0) {
>                         off += noff;
>                         continue;
> --
> 2.30.2
>


-- 
Thanks,

Steve

  reply	other threads:[~2021-07-13  4:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-13  2:22 [PATCH] cifs: Do not use the original cruid when following DFS links for multiuser mounts Ronnie Sahlberg
2021-07-13  4:58 ` Steve French [this message]
2021-07-13 15:36 ` Paulo Alcantara

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='CAH2r5mu3VWp1PA=87sw_eWSbx+UdQ3utBBrpd1ESiYM24YKp+g@mail.gmail.com' \
    --to=smfrench@gmail.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=lsahlber@redhat.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).