1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-30 17:49:30 +03:00

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 <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 201e1969bf)
This commit is contained in:
Ralph Boehme
2022-09-02 12:09:53 +02:00
committed by Jule Anger
parent b807f3624d
commit 7c83b7788e

View File

@ -6224,7 +6224,7 @@ NTSTATUS create_file_default(connection_struct *conn,
} }
if (!(conn->fs_capabilities & FILE_NAMED_STREAMS)) { if (!(conn->fs_capabilities & FILE_NAMED_STREAMS)) {
status = NT_STATUS_OBJECT_NAME_NOT_FOUND; status = NT_STATUS_OBJECT_NAME_INVALID;
goto fail; goto fail;
} }
} }