summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-05-05 01:06:23 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:25 -0500
commit34facd7e6935749291d64f37ae95b84ded792fb8 (patch)
treed07ee42faf1954af8ced6f69a01cb3e20ee1cede
parentdcdd94f20955e68b80769cb7ee42dd256e40da26 (diff)
downloadsamba-34facd7e6935749291d64f37ae95b84ded792fb8.tar.gz
samba-34facd7e6935749291d64f37ae95b84ded792fb8.tar.bz2
samba-34facd7e6935749291d64f37ae95b84ded792fb8.zip
r481: Fix up assert caught by check_path_syntax.
Jeremy. (This used to be commit 8a58bd39da596cac68abc0143cdb17981642daf6)
-rw-r--r--source3/smbd/nttrans.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index e4ffec339b..7e4cac7b38 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -643,6 +643,7 @@ create_options = 0x%x root_dir_fid = 0x%x\n", flags, desired_access, file_attrib
/*
* This filename is relative to a directory fid.
*/
+ pstring rel_fname;
files_struct *dir_fsp = file_fsp(inbuf,smb_ntcreate_RootDirectoryFid);
size_t dir_name_len;
@@ -695,11 +696,12 @@ create_options = 0x%x root_dir_fid = 0x%x\n", flags, desired_access, file_attrib
dir_name_len++;
}
- srvstr_get_path(inbuf, &fname[dir_name_len], smb_buf(inbuf), sizeof(fname)-dir_name_len, 0, STR_TERMINATE, &status);
+ srvstr_get_path(inbuf, rel_fname, smb_buf(inbuf), sizeof(rel_fname), 0, STR_TERMINATE, &status);
if (!NT_STATUS_IS_OK(status)) {
END_PROFILE(SMBntcreateX);
return ERROR_NT(status);
}
+ pstrcat(fname, rel_fname);
} else {
srvstr_get_path(inbuf, fname, smb_buf(inbuf), sizeof(fname), 0, STR_TERMINATE, &status);
if (!NT_STATUS_IS_OK(status)) {
@@ -1207,7 +1209,6 @@ static int call_nt_transact_create(connection_struct *conn, char *inbuf, char *o
/*
* This filename is relative to a directory fid.
*/
-
files_struct *dir_fsp = file_fsp(params,4);
size_t dir_name_len;