* [PATCH] cifs: Do not use the original cruid when following DFS links for multiuser mounts
@ 2021-07-13 2:22 Ronnie Sahlberg
2021-07-13 4:58 ` Steve French
2021-07-13 15:36 ` Paulo Alcantara
0 siblings, 2 replies; 3+ messages in thread
From: Ronnie Sahlberg @ 2021-07-13 2:22 UTC (permalink / raw)
To: linux-cifs; +Cc: Steve French
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cifs: Do not use the original cruid when following DFS links for multiuser mounts
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
2021-07-13 15:36 ` Paulo Alcantara
1 sibling, 0 replies; 3+ messages in thread
From: Steve French @ 2021-07-13 4:58 UTC (permalink / raw)
To: Ronnie Sahlberg; +Cc: linux-cifs
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cifs: Do not use the original cruid when following DFS links for multiuser mounts
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
@ 2021-07-13 15:36 ` Paulo Alcantara
1 sibling, 0 replies; 3+ messages in thread
From: Paulo Alcantara @ 2021-07-13 15:36 UTC (permalink / raw)
To: Ronnie Sahlberg, linux-cifs; +Cc: Steve French
Ronnie Sahlberg <lsahlber@redhat.com> writes:
> 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(+)
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-13 15:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-07-13 15:36 ` Paulo Alcantara
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).