s3: smbd: Fix delete operations enumerating streams inside a file. This must always...
authorJeremy Allison <jra@samba.org>
Tue, 19 Jul 2016 16:21:08 +0000 (09:21 -0700)
committerRalph Boehme <slow@samba.org>
Tue, 19 Jul 2016 23:38:28 +0000 (01:38 +0200)
commita4f1ecf50d9ab1e8c74a7543eeb3cca41df529fc
tree8af6421ab03ab7fc2b6d80c4cabeb9b33009e175
parentbbdace4b2c2b24aab02b7da9579b5edc6eafdf8d
s3: smbd: Fix delete operations enumerating streams inside a file. This must always be done as a Windows operation.

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>
source3/smbd/close.c
source3/smbd/open.c