]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: remove any preceding delimiter from prefix_path
authorSachin Prabhu <sprabhu@redhat.com>
Mon, 8 Feb 2016 08:14:01 +0000 (13:44 +0530)
committerSteve French <smfrench@gmail.com>
Tue, 17 May 2016 19:09:33 +0000 (14:09 -0500)
commitef17ff6fa1584f86d21e9cd7a5f74fd12c95cae0
tree3fe454b4558c67d1c62a83bfa49bb6f2c92be4a1
parent7bff07748da96ca6159297238b390a8668748ff5
cifs: remove any preceding delimiter from prefix_path

We currently do not check if any delimiter exists before the prefix
path in cifs_compose_mount_options(). Consequently when building the
devname using cifs_build_devname() we can end up with multiple
delimiters separating the UNC and the prefix path.

An issue was reported by the customer mounting a folder within a DFS
share from a Netapp server which uses McAfee antivirus. We have
narrowed down the cause to the use of double backslashes in the file
name used to open the file. This was determined to be caused because of
additional delimiters as a result of the bug.

In addition to changes in cifs_build_devname(), we also fix
cifs_parse_devname() to ignore any preceding delimiter for the prefix
path.

The problem was originally reported on RHEL 6 in RHEL bz 1252721. This
is the upstream version of the fix. The fix was confirmed by looking at
the packet capture of a DFS mount.

Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
fs/cifs/cifs_dfs_ref.c
fs/cifs/connect.c