diff options
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r-- | source3/smbd/trans2.c | 32 |
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, ¶ms[6], sizeof(fname), total_params - 6, STR_TERMINATE, &status); + srvstr_get_path(inbuf, SVAL(inbuf,smb_flg2), fname, ¶ms[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, ¶ms[6], sizeof(fname), total_params - 6, STR_TERMINATE, &status); + srvstr_get_path(inbuf, SVAL(inbuf,smb_flg2), fname, ¶ms[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, ¶ms[4], sizeof(directory), total_params - 4, STR_TERMINATE, &status); + srvstr_get_path(inbuf, SVAL(inbuf,smb_flg2), directory, ¶ms[4], + sizeof(directory), total_params - 4, STR_TERMINATE, + &status); if (!NT_STATUS_IS_OK(status)) { return ERROR_NT(status); } |