summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-12-01 14:23:30 -0800
committerJeremy Allison <jra@samba.org>2008-12-01 14:23:30 -0800
commite6a2ce970bf24a1ff588ee2f492e47b88145992f (patch)
tree4f56f709068774092da45a3a9ae53fcd2416185d /source3
parent0b169748ce879ce7a1b6b9d9d4f4bc9b1b7045e0 (diff)
downloadsamba-e6a2ce970bf24a1ff588ee2f492e47b88145992f.tar.gz
samba-e6a2ce970bf24a1ff588ee2f492e47b88145992f.tar.bz2
samba-e6a2ce970bf24a1ff588ee2f492e47b88145992f.zip
s3:smbd: give the correct error when trying to replace a stream
metze
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/reply.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index a1833b55df..11c713ab4a 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -5496,6 +5496,12 @@ NTSTATUS rename_internals_fsp(connection_struct *conn,
return NT_STATUS_OBJECT_NAME_COLLISION;
}
+ if(replace_if_exists && dst_exists) {
+ if (is_ntfs_stream_name(newname)) {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
+ }
+
if (dst_exists) {
struct file_id fileid = vfs_file_id_from_sbuf(conn, &sbuf1);
files_struct *dst_fsp = file_find_di_first(fileid);