From: Volker Lendecke Date: Mon, 28 Mar 2022 13:11:48 +0000 (+0200) Subject: smbd: Fix create_file_unixpath()'s stream handling X-Git-Tag: tevent-0.12.0~219 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af1719a92b4ec2d519515acd7d8166454bcae78f;p=thirdparty%2Fsamba.git smbd: Fix create_file_unixpath()'s stream handling Make create_file_unixpath() robust against callers explicitly passing in ":$DATA" as a stream name indicating the default stream. Right now we NULL this out in callers, but this might change in the future. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 0d64e534149..04afb624a76 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -5689,7 +5689,7 @@ static NTSTATUS create_file_unixpath(connection_struct *conn, if ((conn->fs_capabilities & FILE_NAMED_STREAMS) && (access_mask & DELETE_ACCESS) - && !is_ntfs_stream_smb_fname(smb_fname)) { + && !is_named_stream(smb_fname)) { /* * We can't open a file with DELETE access if any of the * streams is open without FILE_SHARE_DELETE