s3/smbd: allow GET_DFS_REFERRAL fsctl on any smb2 connexion
authorAurelien Aptel <aaptel@suse.com>
Thu, 23 Feb 2017 13:05:14 +0000 (14:05 +0100)
committerJeremy Allison <jra@samba.org>
Sat, 25 Feb 2017 01:38:28 +0000 (02:38 +0100)
This FSCTL should work on any non-IPC share.

According to [MS-SMB2]
> 3.2.4.20.3 Application Requests DFS Referral Information:
>  The client MUST search for an existing Session and TreeConnect to any
>  share on the server identified by ServerName for the user identified by
>  UserCredentials. If no Session and TreeConnect are found, the client
>  MUST establish a new Session and TreeConnect to IPC$ on the target
>  server as described in section 3.2.4.2 using the supplied ServerName and
>  UserCredentials.

Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Feb 25 02:38:28 CET 2017 on sn-devel-144

source3/smbd/smb2_ioctl_dfs.c

index 9c6647343ccf45a76adae0acd5acb472168506d3..f4dd189f355ce5c1b52c1991abe0e052e111ffe3 100644 (file)
@@ -44,10 +44,6 @@ static NTSTATUS fsctl_dfs_get_refers(TALLOC_CTX *mem_ctx,
        char *dfs_data = NULL;
        DATA_BLOB output;
 
-       if (!IS_IPC(conn)) {
-               return NT_STATUS_INVALID_DEVICE_REQUEST;
-       }
-
        if (!lp_host_msdfs()) {
                return NT_STATUS_FS_DRIVER_REQUIRED;
        }