summaryrefslogtreecommitdiffstats
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-01-31 22:26:23 +0100
committerVolker Lendecke <vlendec@samba.org>2012-01-31 23:30:09 +0100
commit92b96ac84bea5aa8ca37ea6ca17376199aef4142 (patch)
tree30553a0c4ed93a7d56f21931b31d65a9b8df91b1 /source3
parenta93cdacd1679d968862b6c82ea266f986d4c621e (diff)
downloadsamba-92b96ac84bea5aa8ca37ea6ca17376199aef4142.tar.gz
samba-92b96ac84bea5aa8ca37ea6ca17376199aef4142.tar.xz
samba-92b96ac84bea5aa8ca37ea6ca17376199aef4142.zip
s3: Delete streams on directories
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/close.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/smbd/close.c b/source3/smbd/close.c
index 131f4bf5d1f..42e88d82ea3 100644
--- a/source3/smbd/close.c
+++ b/source3/smbd/close.c
@@ -1088,6 +1088,17 @@ static NTSTATUS close_directory(struct smb_request *req, files_struct *fsp,
TALLOC_FREE(lck);
+ if ((fsp->conn->fs_capabilities & FILE_NAMED_STREAMS)
+ && !is_ntfs_stream_smb_fname(fsp->fsp_name)) {
+
+ status = delete_all_streams(fsp->conn, fsp->fsp_name->base_name);
+ if (!NT_STATUS_IS_OK(status)) {
+ DEBUG(5, ("delete_all_streams failed: %s\n",
+ nt_errstr(status)));
+ goto out;
+ }
+ }
+
status = rmdir_internals(talloc_tos(), fsp);
DEBUG(5,("close_directory: %s. Delete on close was set - "