Commit 50630b3f authored by Ronnie Sahlberg's avatar Ronnie Sahlberg Committed by Steve French

cifs: Do not use the original cruid when following DFS links for multiuser mounts

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: 24e0a1ef ("cifs: switch to new mount api")
Cc: stable@vger.kernel.org # 5.11+
Reported-by: default avatarXiaoli Feng <xifeng@redhat.com>
Signed-off-by: default avatarRonnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 506c1da4
...@@ -211,6 +211,10 @@ char *cifs_compose_mount_options(const char *sb_mountdata, ...@@ -211,6 +211,10 @@ char *cifs_compose_mount_options(const char *sb_mountdata,
else else
noff = tkn_e - (sb_mountdata + off) + 1; 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) { if (strncasecmp(sb_mountdata + off, "unc=", 4) == 0) {
off += noff; off += noff;
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment