summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2018-05-26 18:32:21 +0200
committerKarolin Seeger <kseeger@samba.org>2018-07-12 13:10:26 +0200
commit425f513e98a9446e487dd5cd5d9de7ee58404bff (patch)
tree6d86e7ed4541321e6f8b394d29db349521c92c7d /source3
parentdd78d9a602e2a088b3a3b7ce0f0a9520ce926268 (diff)
downloadsamba-425f513e98a9446e487dd5cd5d9de7ee58404bff.tar.gz
s3:smbd: don't allow renaming basefile if streams are open
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13451 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 465b7d07e5db787c3d6330371e5e42ecbb1b57b9)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/reply.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 623f83b1250..2b5bb8f1ed6 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -6642,6 +6642,10 @@ NTSTATUS rename_internals_fsp(connection_struct *conn,
return status;
}
+ if (file_has_open_streams(fsp)) {
+ return NT_STATUS_ACCESS_DENIED;
+ }
+
/* Make a copy of the dst smb_fname structs */
smb_fname_dst = cp_smb_filename(ctx, smb_fname_dst_in);