]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: return NT_STATUS_OBJECT_NAME_INVALID if a share doesn't support streams
authorRalph Boehme <slow@samba.org>
Fri, 2 Sep 2022 10:09:53 +0000 (12:09 +0200)
committerJule Anger <janger@samba.org>
Tue, 6 Sep 2022 06:32:13 +0000 (06:32 +0000)
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 201e1969bf31af07e8bd52876ff7f4d72b48a848)

source3/smbd/open.c

index 7a91b2a6d5902274783ce6b0d81d4262c71052fe..9d4698dfca4f74d66a39d4cc2787c95eea95d8c6 100644 (file)
@@ -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;
                }
        }