summaryrefslogtreecommitdiff
path: root/source3/smbd/trans2.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-09-13 22:08:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:30:44 -0500
commiteacd3140573d1122a3785823e4003bfc6352c431 (patch)
treea1ee9d9e59da4c44e0484d895eb78a8c8e1f0de2 /source3/smbd/trans2.c
parentd0de93ca762e8b59f09c2179448188c9952f68fc (diff)
downloadsamba-eacd3140573d1122a3785823e4003bfc6352c431.tar.gz
samba-eacd3140573d1122a3785823e4003bfc6352c431.tar.bz2
samba-eacd3140573d1122a3785823e4003bfc6352c431.zip
r25138: More pstring elimination. Add a TALLOC_CTX parameter
to unix_convert(). Jeremy. (This used to be commit 39c211a702e91c34c1a5a689e1b0c4530ea8a1ac)
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r--source3/smbd/trans2.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 63dcb06f5d..7af4bcee60 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -844,7 +844,7 @@ static void call_trans2open(connection_struct *conn,
/* XXXX we need to handle passed times, sattr and flags */
- status = unix_convert(conn, fname, False, &fname, NULL, &sbuf);
+ status = unix_convert(ctx, conn, fname, False, &fname, NULL, &sbuf);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
return;
@@ -1872,7 +1872,7 @@ close_if_end = %d requires_resume_key = %d level = 0x%x, max_data_bytes = %d\n",
return;
}
- ntstatus = unix_convert(conn, directory, True, &directory, NULL, &sbuf);
+ ntstatus = unix_convert(ctx, conn, directory, True, &directory, NULL, &sbuf);
if (!NT_STATUS_IS_OK(ntstatus)) {
reply_nterror(req, ntstatus);
return;
@@ -3664,7 +3664,7 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
return;
}
- status = unix_convert(conn, fname, False, &fname, NULL, &sbuf);
+ status = unix_convert(ctx, conn, fname, False, &fname, NULL, &sbuf);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
return;
@@ -4430,7 +4430,8 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd
code.
****************************************************************************/
-NTSTATUS hardlink_internals(connection_struct *conn,
+NTSTATUS hardlink_internals(TALLOC_CTX *ctx,
+ connection_struct *conn,
const char *oldname_in,
const char *newname_in)
{
@@ -4444,7 +4445,7 @@ NTSTATUS hardlink_internals(connection_struct *conn,
ZERO_STRUCT(sbuf1);
ZERO_STRUCT(sbuf2);
- status = unix_convert(conn, oldname_in, False, &oldname,
+ status = unix_convert(ctx, conn, oldname_in, False, &oldname,
&last_component_oldname, &sbuf1);
if (!NT_STATUS_IS_OK(status)) {
return status;
@@ -4460,7 +4461,7 @@ NTSTATUS hardlink_internals(connection_struct *conn,
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
- status = unix_convert(conn, newname_in, False, &newname,
+ status = unix_convert(ctx, conn, newname_in, False, &newname,
&last_component_newname, &sbuf2);
if (!NT_STATUS_IS_OK(status)) {
return status;
@@ -4933,7 +4934,7 @@ static NTSTATUS smb_set_file_unix_hlink(connection_struct *conn,
DEBUG(10,("smb_set_file_unix_hlink: SMB_SET_FILE_UNIX_LINK doing hard link %s -> %s\n",
fname, oldname));
- return hardlink_internals(conn, oldname, fname);
+ return hardlink_internals(ctx, conn, oldname, fname);
}
/****************************************************************************
@@ -5021,7 +5022,7 @@ static NTSTATUS smb_file_rename_information(connection_struct *conn,
ZERO_STRUCT(sbuf);
- status = unix_convert(conn, newname, False,
+ status = unix_convert(ctx, conn, newname, False,
&newname,
&newname_last_component,
&sbuf);
@@ -6317,7 +6318,8 @@ static void call_trans2setfilepathinfo(connection_struct *conn,
return;
}
- status = unix_convert(conn, fname, False, &fname, NULL, &sbuf);
+ status = unix_convert(ctx, conn, fname, False,
+ &fname, NULL, &sbuf);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
return;
@@ -6665,7 +6667,7 @@ static void call_trans2mkdir(connection_struct *conn, struct smb_request *req,
DEBUG(3,("call_trans2mkdir : name = %s\n", directory));
- status = unix_convert(conn, directory, False, &directory, NULL, &sbuf);
+ status = unix_convert(ctx, conn, directory, False, &directory, NULL, &sbuf);
if (!NT_STATUS_IS_OK(status)) {
reply_nterror(req, status);
return;