From c7fee9447aa97ec700e54e0af222ae25e1d8c9d2 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 18 Jul 2016 13:40:07 -0700 Subject: [PATCH] s3: smbd: Prevent recursion when POSIX opening a file for delete that contains names streams. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12021 Signed-off-by: Jeremy Allison --- source3/smbd/open.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 0a6ec0d..f2ea8d2 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -4507,6 +4507,7 @@ static NTSTATUS create_file_unixpath(connection_struct *conn, if ((conn->fs_capabilities & FILE_NAMED_STREAMS) && (access_mask & DELETE_ACCESS) + && !(file_attributes & FILE_FLAG_POSIX_SEMANTICS) && !is_ntfs_stream_smb_fname(smb_fname)) { /* * We can't open a file with DELETE access if any of the -- 2.8.0.rc3.226.g39d4020