From: Ralph Boehme Date: Fri, 2 Sep 2022 10:09:53 +0000 (+0200) Subject: smbd: return NT_STATUS_OBJECT_NAME_INVALID if a share doesn't support streams X-Git-Tag: samba-4.15.10~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa6012b63ab36704dfcfd6f95958ae0e089a94b5;p=thirdparty%2Fsamba.git smbd: return NT_STATUS_OBJECT_NAME_INVALID if a share doesn't support streams This is what a Windows server returns. Tested with a share residing on a FAT formatted drive, a Windows filesystem that doesn't support streams. Combinations tested: file::$DATA file:stream file:stream:$DATA All three fail with NT_STATUS_OBJECT_NAME_INVALID. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15126 BUG: https://bugzilla.samba.org/show_bug.cgi?id=15161 Signed-off-by: Ralph Boehme Reviewed-by: Volker Lendecke (cherry picked from commit 201e1969bf31af07e8bd52876ff7f4d72b48a848) --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 7a91b2a6d59..9d4698dfca4 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -6233,7 +6233,7 @@ NTSTATUS create_file_default(connection_struct *conn, } if (!(conn->fs_capabilities & FILE_NAMED_STREAMS)) { - status = NT_STATUS_OBJECT_NAME_NOT_FOUND; + status = NT_STATUS_OBJECT_NAME_INVALID; goto fail; } }