]> git.baikalelectronics.ru Git - kernel.git/commit
SMB2: Fix share type handling
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Fri, 12 May 2017 15:59:32 +0000 (17:59 +0200)
committerSteve French <smfrench@gmail.com>
Sat, 13 May 2017 00:55:56 +0000 (19:55 -0500)
commit485a0ca48e20511e9dfc0ae2fa9141a983b2ac13
treebf041ef190ca864408e994002c30eafeb8f86176
parent47179bedfe61ff98e0bb9a0db1fbd4ca9e0706d9
SMB2: Fix share type handling

In fs/cifs/smb2pdu.h, we have:
#define SMB2_SHARE_TYPE_DISK    0x01
#define SMB2_SHARE_TYPE_PIPE    0x02
#define SMB2_SHARE_TYPE_PRINT   0x03

Knowing that, with the current code, the SMB2_SHARE_TYPE_PRINT case can
never trigger and printer share would be interpreted as disk share.

So, test the ShareType value for equality instead.

Fixes: c0a985d8e7ca ("CIFS: Add tree connect/disconnect capability for SMB2")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Aurelien Aptel <aaptel@suse.com>
Signed-off-by: Steve French <smfrench@gmail.com>
fs/cifs/smb2pdu.c