From bb54f72b94dca9206bf377b0d6a4b669e389e339 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 20 Jan 2011 16:27:56 -0800 Subject: Make processing of incoming stream rename paths common between reply_mv and ntrename. Ensure we don't depend on "./" in the streams module. --- source3/modules/vfs_streams_depot.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'source3/modules') diff --git a/source3/modules/vfs_streams_depot.c b/source3/modules/vfs_streams_depot.c index 853d7b4d98..9870d0d571 100644 --- a/source3/modules/vfs_streams_depot.c +++ b/source3/modules/vfs_streams_depot.c @@ -661,7 +661,6 @@ static int streams_depot_rename(vfs_handle_struct *handle, { struct smb_filename *smb_fname_src_stream = NULL; struct smb_filename *smb_fname_dst_stream = NULL; - struct smb_filename *smb_fname_dst_mod = NULL; bool src_is_stream, dst_is_stream; NTSTATUS status; int ret = -1; @@ -692,23 +691,7 @@ static int streams_depot_rename(vfs_handle_struct *handle, goto done; } - /* - * Handle passing in a stream name without the base file. This is - * exercised by the NTRENAME streams rename path. - */ - if (StrCaseCmp(smb_fname_dst->base_name, "./") == 0) { - status = create_synthetic_smb_fname(talloc_tos(), - smb_fname_src->base_name, - smb_fname_dst->stream_name, - NULL, &smb_fname_dst_mod); - if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); - goto done; - } - } - - status = stream_smb_fname(handle, (smb_fname_dst_mod ? - smb_fname_dst_mod : smb_fname_dst), + status = stream_smb_fname(handle, smb_fname_dst, &smb_fname_dst_stream, false); if (!NT_STATUS_IS_OK(status)) { errno = map_errno_from_nt_status(status); @@ -721,7 +704,6 @@ static int streams_depot_rename(vfs_handle_struct *handle, done: TALLOC_FREE(smb_fname_src_stream); TALLOC_FREE(smb_fname_dst_stream); - TALLOC_FREE(smb_fname_dst_mod); return ret; } -- cgit