[PATCH 2/2] s3/smbd: Fix error code for unsupported SET_INFO requests
Justin Maggard
jmaggard10 at gmail.com
Tue Jan 9 20:04:16 UTC 2018
FileValidDataLengthInformation and FileShortNameInformation are both
valid FileInfoClasses that we don't support. According to [MS-SMB2]
3.3.5.21.1, we should be returning STATUS_NOT_SUPPORTED instead of
NT_STATUS_INVALID_LEVEL for these.
Signed-off-by: Justin Maggard <jmaggard at netgear.com>
---
source3/smbd/trans2.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index dbad71be3b7..512918efc89 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -8541,6 +8541,11 @@ NTSTATUS smbd_do_setfilepathinfo(connection_struct *conn,
break;
}
+ /* [MS-SMB2] 3.3.5.21.1 states we MUST fail with STATUS_NOT_SUPPORTED. */
+ case SMB_FILE_VALID_DATA_LENGTH_INFORMATION:
+ case SMB_FILE_SHORT_NAME_INFORMATION:
+ return NT_STATUS_NOT_SUPPORTED;
+
/*
* CIFS UNIX extensions.
*/
--
2.15.1
More information about the samba-technical
mailing list