]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:smbd: Allow STREAM_INFORMATION query on alternate stream handles
authorAndreas Schneider <asn@samba.org>
Mon, 15 Jun 2026 09:57:31 +0000 (11:57 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 16 Jun 2026 11:38:33 +0000 (11:38 +0000)
according to MS-FSA querying for SMB_FILE_STREAM_INFORMATION on a stream is
valid and MS-FSA 2.1.5.12.29 FileStreamInformation tells us to return the streams
associated with the underlying File object:

* For each Stream ThisStream of Open.File ...

BUG: https://bugzilla.samba.org/show_bug.cgi?id=16144

Pair-Programmed-With: Ralph Boehme <slow@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
selftest/knownfail.d/samba3.smb2.streams
source3/smbd/smb2_trans2.c

index ca49d072fc197f95cad995fcf6ea549e864776c4..b4a75b6b3350ccee406d3eb28fcd776e4c827606 100644 (file)
@@ -1,4 +1 @@
-^samba3.smb2.streams.io\(.*\)
-^samba3.smb2.streams.create-disposition\(.*\)
-^samba3.smb2.streams streams_xattr.io\(.*\)
 ^samba3.smb2.streams streams_xattr.create-disposition\(.*\)
index 8342ff003332aee987918089eeacd1c263311687..5f5c23e2f8ee23c94b5238e8a5f79087a06ab769 100644 (file)
@@ -3566,7 +3566,10 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn,
                        DBG_DEBUG("SMB_FILE_STREAM_INFORMATION\n");
 
                        if (is_ntfs_stream_smb_fname(smb_fname)) {
-                               return NT_STATUS_INVALID_PARAMETER;
+                               if (!fsp_is_alternate_stream(fsp)) {
+                                       return NT_STATUS_INVALID_PARAMETER;
+                               }
+                               fsp = fsp->base_fsp;
                        }
 
                        status = vfs_fstreaminfo(fsp,