Skip to content

Commit 50630b3

Browse files
Ronnie Sahlbergsmfrench
authored andcommitted
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: 24e0a1e ("cifs: switch to new mount api") Cc: [email protected] # 5.11+ Reported-by: Xiaoli Feng <[email protected]> Signed-off-by: Ronnie Sahlberg <[email protected]> Reviewed-by: Paulo Alcantara (SUSE) <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 506c1da commit 50630b3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

fs/cifs/cifs_dfs_ref.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,10 @@ char *cifs_compose_mount_options(const char *sb_mountdata,
211211
else
212212
noff = tkn_e - (sb_mountdata + off) + 1;
213213

214+
if (strncasecmp(sb_mountdata + off, "cruid=", 6) == 0) {
215+
off += noff;
216+
continue;
217+
}
214218
if (strncasecmp(sb_mountdata + off, "unc=", 4) == 0) {
215219
off += noff;
216220
continue;

0 commit comments

Comments
 (0)