ksmbd: Return STATUS_OBJECT_PATH_NOT_FOUND if smb2_creat() returns ENOENT
authorMarios Makassikis <mmakassikis@freebox.fr>
Tue, 27 Jul 2021 00:24:51 +0000 (09:24 +0900)
committerNamjae Jeon <namjae.jeon@samsung.com>
Tue, 27 Jul 2021 00:26:24 +0000 (09:26 +0900)
commitd337a44e429e6de23ed3d73fcb81ec44f7b05522
treeb01314c85343e171a8cdd4c35b226cf493494b07
parent1d904eaf3f99565bdeffbed359e44dd88efbef02
ksmbd: Return STATUS_OBJECT_PATH_NOT_FOUND if smb2_creat() returns ENOENT

Both Windows 10's SMB server and samba return STATUS_OBJECT_PATH_NOT_FOUND
when trying to access a nonexistent path.

This fixes Windows 10 File History tool. The latter relies on the server
returning STATUS_OBJECT_PATH_NOT_FOUND to figure out what part of the
target path needs to be created. Returning STATUS_OBJECT_NAME_INVALID
will make it stop and display an error to the user.

Signed-off-by: Marios Makassikis <mmakassikis@freebox.fr>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/ksmbd/smb2pdu.c