summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-01-20 16:27:56 -0800
committerJeremy Allison <jra@samba.org>2011-01-20 16:27:56 -0800
commitbb54f72b94dca9206bf377b0d6a4b669e389e339 (patch)
tree9f7ade27a231d49d6b7e03dab7da5f4e84976c30 /source3/modules
parent330b922bd6a80ccbdc6122012ce1ed273fd3f2e0 (diff)
downloadsamba-bb54f72b94dca9206bf377b0d6a4b669e389e339.tar.gz
samba-bb54f72b94dca9206bf377b0d6a4b669e389e339.tar.bz2
samba-bb54f72b94dca9206bf377b0d6a4b669e389e339.zip
Make processing of incoming stream rename paths common between reply_mv and ntrename. Ensure we don't depend on "./" in the streams module.
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_streams_depot.c20
1 files changed, 1 insertions, 19 deletions
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;
}