From: Andreas Schneider Date: Mon, 15 Jun 2026 09:57:31 +0000 (+0200) Subject: s3:smbd: Allow STREAM_INFORMATION query on alternate stream handles X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95d27f5e7a293262607feeeec6782f11d47f5579;p=thirdparty%2Fsamba.git s3:smbd: Allow STREAM_INFORMATION query on alternate stream handles 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 Signed-off-by: Andreas Schneider Signed-off-by: Ralph Boehme --- diff --git a/selftest/knownfail.d/samba3.smb2.streams b/selftest/knownfail.d/samba3.smb2.streams index ca49d072fc1..b4a75b6b335 100644 --- a/selftest/knownfail.d/samba3.smb2.streams +++ b/selftest/knownfail.d/samba3.smb2.streams @@ -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\(.*\) diff --git a/source3/smbd/smb2_trans2.c b/source3/smbd/smb2_trans2.c index 8342ff00333..5f5c23e2f8e 100644 --- a/source3/smbd/smb2_trans2.c +++ b/source3/smbd/smb2_trans2.c @@ -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,