• Steve French's avatar
    [CIFS] make sure that DFS pathnames are properly formed · c6fbba05
    Steve French authored
    The paths in a DFS request are supposed to only have a single preceding
    backslash, but we are sending them with a double backslash. This is
    exposing a bug in Windows where it also sends a path in the response
    that has a double backslash.
    
    The existing code that builds the mount option string however expects a
    double backslash prefix in a couple of places when it tries to use the
    path returned by build_path_from_dentry. Fix compose_mount_options to
    expect properly formed DFS paths (single backslash at front).
    
    Also clean up error handling in that function. There was a possible
    NULL pointer dereference and situations where a partially built option
    string would be returned.
    
    Tested against Samba 3.0.28-ish server and Samba 3.3 and Win2k8.
    
    CC: Stable <stable@kernel.org>
    Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
    Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
    c6fbba05
To find the state of this project's repository at the time of any of these versions, check out the tags.
CHANGES 42 KB