• Sachin Prabhu's avatar
    cifs: Add support for follow_link on dfs shares under posix extensions · 924e3fa4
    Sachin Prabhu authored
    When using posix extensions, dfs shares in the dfs root show up as
    symlinks resulting in userland tools such as 'ls' calling readlink() on
    these shares. Since these are dfs shares, we end up returning -EREMOTE.
    
    $ ls -l /mnt
    ls: cannot read symbolic link /mnt/test: Object is remote
    total 0
    lrwxrwxrwx. 1 root root 19 Nov  6 09:47 test
    
    With added follow_link() support for dfs shares, when using unix
    extensions, we call GET_DFS_REFERRAL to obtain the DFS referral and
    return the first node returned.
    
    The dfs share in the dfs root is now displayed in the following manner.
    $ ls -l /mnt
    total 0
    lrwxrwxrwx. 1 root root 19 Nov  6 09:47 test -> \vm140-31\test
    Signed-off-by: default avatarSachin Prabhu <sprabhu@redhat.com>
    Reviewed-by: default avatarJeff Layton <jlayton@redhat.com>
    Signed-off-by: default avatarSteve French <smfrench@gmail.com>
    924e3fa4
smb1ops.c 31.2 KB