summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-12-24 13:44:44 +0100
committerVolker Lendecke <vl@samba.org>2008-12-31 19:33:25 +0100
commit4a9a569600cbcddffcfbeca97587de516259e939 (patch)
treed2406561ff0670486aec0423de79e5e41f07567c /source3
parent5f0b633c725238602dbd5ce8ae4aac8f7bbe6e8d (diff)
downloadsamba-4a9a569600cbcddffcfbeca97587de516259e939.tar.gz
samba-4a9a569600cbcddffcfbeca97587de516259e939.tar.bz2
samba-4a9a569600cbcddffcfbeca97587de516259e939.zip
Use parent_dirname_talloc instead of parent_dirname in copy_internals
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/nttrans.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 24a14a8c1b..c9874f6a48 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -1127,6 +1127,7 @@ static NTSTATUS copy_internals(TALLOC_CTX *ctx,
int info;
SMB_OFF_T ret=-1;
NTSTATUS status = NT_STATUS_OK;
+ char *parent;
ZERO_STRUCT(sbuf1);
ZERO_STRUCT(sbuf2);
@@ -1255,8 +1256,11 @@ static NTSTATUS copy_internals(TALLOC_CTX *ctx,
/* 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 */
- file_set_dosmode(conn, newname, fattr, &sbuf2,
- parent_dirname(newname),false);
+ if (!parent_dirname_talloc(talloc_tos(), newname, &parent, NULL)) {
+ return NT_STATUS_NO_MEMORY;
+ }
+ file_set_dosmode(conn, newname, fattr, &sbuf2, parent, false);
+ TALLOC_FREE(parent);
if (ret < (SMB_OFF_T)sbuf1.st_size) {
return NT_STATUS_DISK_FULL;