summaryrefslogtreecommitdiffstats
path: root/source3/smbd/nttrans.c
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2009-07-06 14:36:16 -0700
committerTim Prouty <tprouty@samba.org>2009-07-06 15:38:41 -0700
commit99bd4fda0cd97eb211549a511a2ff6153c2bde2d (patch)
treedb1e4d3424b6bd1215a341f727ef94c748244454 /source3/smbd/nttrans.c
parent0f6e10886f3f778fe301ee981873f29d295d39c5 (diff)
downloadsamba-99bd4fda0cd97eb211549a511a2ff6153c2bde2d.tar.gz
samba-99bd4fda0cd97eb211549a511a2ff6153c2bde2d.tar.xz
samba-99bd4fda0cd97eb211549a511a2ff6153c2bde2d.zip
s3: Plumb smb_filename around SMB_VFS_CHFLAGS
SMB_VFS_CHFLAGS isn't actually getting the smb_filename struct for now since it only operates on the basefile. This is the strategy for all path-based operations that will never actually operate on a stream. By clarifying the meaning of path based operations that don't take an smb_filename struct, modules that implement streams such as vfs_onefs no longer need to implement SMB_VFS_CHFLAGS to ensure it's only called on the base_name.
Diffstat (limited to 'source3/smbd/nttrans.c')
-rw-r--r--source3/smbd/nttrans.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index add0b40f2ef..b970ffc05e7 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -1219,7 +1219,6 @@ static NTSTATUS copy_internals(TALLOC_CTX *ctx,
uint32 attrs)
{
char *oldname = NULL;
- char *newname = NULL;
files_struct *fsp1,*fsp2;
uint32 fattr;
int info;
@@ -1328,20 +1327,15 @@ static NTSTATUS copy_internals(TALLOC_CTX *ctx,
status = close_file(NULL, fsp2, NORMAL_CLOSE);
- status = get_full_smb_filename(ctx, smb_fname_dst, &newname);
- if (!NT_STATUS_IS_OK(status)) {
- goto out;
- }
-
/* Grrr. We have to do this as open_file_ntcreate adds aARCH when it
creates the file. This isn't the correct thing to do in the copy
case. JRA */
- if (!parent_dirname(talloc_tos(), newname, &parent, NULL)) {
+ if (!parent_dirname(talloc_tos(), smb_fname_dst->base_name, &parent,
+ NULL)) {
status = NT_STATUS_NO_MEMORY;
goto out;
}
- file_set_dosmode(conn, newname, fattr, &smb_fname_dst->st, parent,
- false);
+ file_set_dosmode(conn, smb_fname_dst, fattr, parent, false);
TALLOC_FREE(parent);
if (ret < (SMB_OFF_T)smb_fname_src->st.st_ex_size) {
@@ -1356,8 +1350,6 @@ static NTSTATUS copy_internals(TALLOC_CTX *ctx,
}
TALLOC_FREE(oldname);
- TALLOC_FREE(newname);
-
return status;
}