summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@sernet.de>2007-12-07 10:46:11 +0100
committerVolker Lendecke <vl@sernet.de>2007-12-07 14:05:05 +0100
commit30d31a3f85399042cd7f337c85a261352dd31b09 (patch)
tree6f20284494dcb459c5c918babd66361ffa666a0f /source3
parentbccadf83bb67d9f1c6b4ee21ed66b509eb15d2e9 (diff)
downloadsamba-30d31a3f85399042cd7f337c85a261352dd31b09.tar.gz
samba-30d31a3f85399042cd7f337c85a261352dd31b09.tar.bz2
samba-30d31a3f85399042cd7f337c85a261352dd31b09.zip
Make fname arg to create_file a "const char *"
(This used to be commit da94b5f9e37f38880e8ca4c2c7f8de6838864321)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/open.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 66ceb8dac7..f4c3791b43 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2447,7 +2447,7 @@ static struct case_semantics_state *set_posix_case_semantics(TALLOC_CTX *mem_ctx
NTSTATUS create_file(connection_struct *conn,
struct smb_request *req,
uint16_t root_dir_fid,
- char *fname,
+ const char *fname,
uint32_t flags,
uint32_t access_mask,
uint32_t file_attributes,
@@ -2624,7 +2624,10 @@ NTSTATUS create_file(connection_struct *conn,
}
if ((req != NULL) && (req->flags2 & FLAGS2_DFS_PATHNAMES)) {
- status = resolve_dfspath(talloc_tos(), conn, true, fname, &fname);
+ char *resolved_fname;
+
+ status = resolve_dfspath(talloc_tos(), conn, true, fname,
+ &resolved_fname);
if (!NT_STATUS_IS_OK(status)) {
/*
@@ -2635,6 +2638,7 @@ NTSTATUS create_file(connection_struct *conn,
*/
goto fail;
}
+ fname = resolved_fname;
}
/*
@@ -2646,10 +2650,15 @@ NTSTATUS create_file(connection_struct *conn,
file_attributes &= ~FILE_FLAG_POSIX_SEMANTICS;
}
- status = unix_convert(talloc_tos(), conn, fname, False, &fname, NULL,
- &sbuf);
- if (!NT_STATUS_IS_OK(status)) {
- goto fail;
+ {
+ char *converted_fname;
+
+ status = unix_convert(talloc_tos(), conn, fname, False,
+ &converted_fname, NULL, &sbuf);
+ if (!NT_STATUS_IS_OK(status)) {
+ goto fail;
+ }
+ fname = converted_fname;
}
/* All file access must go through check_name() */