When using UNIX extensions to delete a file containing streams,
the open for delete and close operations need to enumerate the
contained streams and do CREATE and UNLINK operations on the
stream names. These must always be done as Windows operations
(remove the SMB_FILENAME_POSIX_PATH flag) as the stream names
are Windows paths.
Without this the create operation under the unlink will
recurse and cause the client to time out (or a server crash).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12021
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
smb_fname->base_name,
stream_info[i].name,
NULL,
- smb_fname->flags);
+ (smb_fname->flags &
+ ~SMB_FILENAME_POSIX_PATH));
if (smb_fname_stream == NULL) {
DEBUG(0, ("talloc_aprintf failed\n"));
smb_fname->base_name,
stream_info[i].name,
NULL,
- smb_fname->flags);
+ (smb_fname->flags &
+ ~SMB_FILENAME_POSIX_PATH));
if (smb_fname_cp == NULL) {
status = NT_STATUS_NO_MEMORY;
goto fail;