• Sachin Prabhu's avatar
    cifs: remove any preceding delimiter from prefix_path · 11e31647
    Sachin Prabhu authored
    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: default avatarSachin Prabhu <sprabhu@redhat.com>
    Signed-off-by: default avatarSteve French <smfrench@gmail.com>
    11e31647
cifs_dfs_ref.c 9.87 KB