summaryrefslogtreecommitdiff
path: root/source3/smbd/trans2.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-07-05 16:36:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:49 -0500
commit8724dfe55155eef0fb612e547ecf0ebaee89adf4 (patch)
treeffe772acd58cf66c0554c322d72e262a95efca76 /source3/smbd/trans2.c
parentfcda5b589633b96415890c569bf23e3e284e0916 (diff)
downloadsamba-8724dfe55155eef0fb612e547ecf0ebaee89adf4.tar.gz
samba-8724dfe55155eef0fb612e547ecf0ebaee89adf4.tar.bz2
samba-8724dfe55155eef0fb612e547ecf0ebaee89adf4.zip
r23727: Explicitly pass down FLAGS2 to srvstr_get_path.
Next step is to remove the bug that in the trans2 code we use the inbuf as the base pointer to decide whether we need ucs2 alignment where we need to use the beginning of the params buffer Jeremy, last one for today to reviw :-) (This used to be commit 18078b9faa3820fb34604063c9079c1ebe3ad47f)
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r--source3/smbd/trans2.c32
1 files changed, 24 insertions, 8 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 2219ebd1c1..15394cd863 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -804,7 +804,9 @@ static int call_trans2open(connection_struct *conn,
return(ERROR_DOS(ERRSRV,ERRaccess));
}
- srvstr_get_path(inbuf, fname, pname, sizeof(fname), total_params - 28, STR_TERMINATE, &status);
+ srvstr_get_path(inbuf, SVAL(inbuf,smb_flg2), fname, pname,
+ sizeof(fname), total_params - 28, STR_TERMINATE,
+ &status);
if (!NT_STATUS_IS_OK(status)) {
return ERROR_NT(status);
}
@@ -1747,7 +1749,9 @@ close_if_end = %d requires_resume_key = %d level = 0x%x, max_data_bytes = %d\n",
return ERROR_NT(NT_STATUS_INVALID_LEVEL);
}
- srvstr_get_path_wcard(inbuf, directory, params+12, sizeof(directory), total_params - 12, STR_TERMINATE, &ntstatus, &mask_contains_wcard);
+ srvstr_get_path_wcard(inbuf, SVAL(inbuf,smb_flg2), directory,
+ params+12, sizeof(directory), total_params - 12,
+ STR_TERMINATE, &ntstatus, &mask_contains_wcard);
if (!NT_STATUS_IS_OK(ntstatus)) {
return ERROR_NT(ntstatus);
}
@@ -2012,7 +2016,10 @@ static int call_trans2findnext(connection_struct *conn, char *inbuf, char *outbu
*mask = *directory = *resume_name = 0;
- srvstr_get_path_wcard(inbuf, resume_name, params+12, sizeof(resume_name), total_params - 12, STR_TERMINATE, &ntstatus, &mask_contains_wcard);
+ srvstr_get_path_wcard(inbuf, SVAL(inbuf,smb_flg2), resume_name,
+ params+12, sizeof(resume_name),
+ total_params - 12, STR_TERMINATE, &ntstatus,
+ &mask_contains_wcard);
if (!NT_STATUS_IS_OK(ntstatus)) {
/* Win9x or OS/2 can send a resume name of ".." or ".". This will cause the parser to
complain (it thinks we're asking for the directory above the shared
@@ -3401,7 +3408,9 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char *
return ERROR_NT(NT_STATUS_INVALID_LEVEL);
}
- srvstr_get_path(inbuf, fname, &params[6], sizeof(fname), total_params - 6, STR_TERMINATE, &status);
+ srvstr_get_path(inbuf, SVAL(inbuf,smb_flg2), fname, &params[6],
+ sizeof(fname), total_params - 6,
+ STR_TERMINATE, &status);
if (!NT_STATUS_IS_OK(status)) {
return ERROR_NT(status);
}
@@ -4587,7 +4596,8 @@ static NTSTATUS smb_set_file_unix_hlink(connection_struct *conn,
return NT_STATUS_INVALID_PARAMETER;
}
- srvstr_get_path(inbuf, oldname, pdata, sizeof(oldname), total_data, STR_TERMINATE, &status);
+ srvstr_get_path(inbuf, SVAL(inbuf,smb_flg2), oldname, pdata,
+ sizeof(oldname), total_data, STR_TERMINATE, &status);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -4637,7 +4647,9 @@ static NTSTATUS smb_file_rename_information(connection_struct *conn,
return NT_STATUS_INVALID_PARAMETER;
}
- srvstr_get_path_wcard(inbuf, newname, &pdata[12], sizeof(newname), len, 0, &status, &dest_has_wcard);
+ srvstr_get_path_wcard(inbuf, SVAL(inbuf,smb_flg2), newname, &pdata[12],
+ sizeof(newname), len, 0, &status,
+ &dest_has_wcard);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
@@ -5850,7 +5862,9 @@ static int call_trans2setfilepathinfo(connection_struct *conn,
}
info_level = SVAL(params,0);
- srvstr_get_path(inbuf, fname, &params[6], sizeof(fname), total_params - 6, STR_TERMINATE, &status);
+ srvstr_get_path(inbuf, SVAL(inbuf,smb_flg2), fname, &params[6],
+ sizeof(fname), total_params - 6, STR_TERMINATE,
+ &status);
if (!NT_STATUS_IS_OK(status)) {
return ERROR_NT(status);
}
@@ -6188,7 +6202,9 @@ static int call_trans2mkdir(connection_struct *conn, char *inbuf, char *outbuf,
return ERROR_NT(NT_STATUS_INVALID_PARAMETER);
}
- srvstr_get_path(inbuf, directory, &params[4], sizeof(directory), total_params - 4, STR_TERMINATE, &status);
+ srvstr_get_path(inbuf, SVAL(inbuf,smb_flg2), directory, &params[4],
+ sizeof(directory), total_params - 4, STR_TERMINATE,
+ &status);
if (!NT_STATUS_IS_OK(status)) {
return ERROR_NT(status);
}