smbtorture failures in smb2.create.gentest
Steve French
smfrench at gmail.com
Fri Mar 31 06:26:05 UTC 2017
I noticed that smbtorture smb2.create.gentest fails for multiple reasons to
Samba (but gets much farther to Windows). Samba looks like it is is
missing at least three checks during open:
Thoughts on adding something similar to the following (so that
smb2.create.gentest would pass and our behavior would better match windows
in validating opens):
sfrench at ubuntu:~/samba/source3$ git diff -a
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 3368bae..4a5ff87 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -4997,6 +4997,17 @@ static NTSTATUS
create_file_unixpath(connection_struct *c
goto fail;
}
+ if ((file_attributes & FILE_ATTRIBUTE_DEVICE) ||
+ (file_attributes & FILE_ATTRIBUTE_VOLUME)) {
+ status = NT_STATUS_INVALID_PARAMETER;
+ goto fail;
+ }
+
+ if (access_mask & 0x0C000000) {
+ status = NT_STATUS_ACCESS_DENIED;
+ goto fail;
+ }
+
if (req == NULL) {
oplock_request |= INTERNAL_OPEN_ONLY;
}
--
Thanks,
Steve
More information about the samba-technical
mailing list