1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

s3:smbd: give the correct error when trying to replace a stream

metze
This commit is contained in:
Stefan Metzmacher
2008-12-01 14:23:30 -08:00
committed by Jeremy Allison
parent 0b169748ce
commit e6a2ce970b

View File

@ -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);