]> 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)
committerRalph Boehme <slow@samba.org>
Fri, 2 Sep 2022 15:00:36 +0000 (15:00 +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>
source3/smbd/open.c

index db0cb47d34d66f1be0f0a1a23804fa53c0d4f75b..d443a0291f9c702e06ecad2f9240d2193785fb69 100644 (file)
@@ -6316,7 +6316,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;
                }
        }