Correctly report share types (now Win7 makes RPC calls against us).
authorJeremy Allison <jra@samba.org>
Tue, 27 Apr 2010 04:36:01 +0000 (21:36 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 27 Apr 2010 04:36:01 +0000 (21:36 -0700)
Jeremy.

source3/smbd/smb2_tcon.c

index c3e46eeb1cb7b692ec5660532e4a37960673f87f..f3efb83c1dedf7a4f11e34f085aac5dff42d3cfb 100644 (file)
@@ -208,7 +208,13 @@ static NTSTATUS smbd_smb2_tree_connect(struct smbd_smb2_request *req,
        tcon->compat_conn = talloc_move(tcon, &compat_conn);
        tcon->compat_conn->cnum = tcon->tid;
 
-       *out_share_type = 0x01;
+       if (IS_PRINT(tcon->compat_conn)) {
+               *out_share_type = 0x03;
+       } else if (IS_IPC(tcon->compat_conn)) {
+               *out_share_type = 0x02;
+       } else {
+               *out_share_type = 0x01;
+       }
        *out_share_flags = SMB2_SHAREFLAG_ALL;
        *out_capabilities = 0;
        *out_maximal_access = FILE_GENERIC_ALL;