summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h2
-rw-r--r--source3/smbd/files.c2
-rw-r--r--source3/smbd/nttrans.c14
-rw-r--r--source3/smbd/open.c2
-rw-r--r--source3/smbd/reply.c42
-rw-r--r--source3/smbd/trans2.c8
6 files changed, 35 insertions, 35 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 7dc0319e7d..a36a725b4f 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -9590,7 +9590,7 @@ files_struct *file_find_print(void);
void file_sync_all(connection_struct *conn);
void file_free(files_struct *fsp);
files_struct *file_fnum(uint16 fnum);
-files_struct *file_fsp(uint16 fid);
+files_struct *file_fsp(struct smb_request *req, uint16 fid);
void file_chain_reset(void);
NTSTATUS dup_file_fsp(files_struct *fsp,
uint32 access_mask,
diff --git a/source3/smbd/files.c b/source3/smbd/files.c
index 519f4945f2..ee3b6f520c 100644
--- a/source3/smbd/files.c
+++ b/source3/smbd/files.c
@@ -470,7 +470,7 @@ files_struct *file_fnum(uint16 fnum)
Get an fsp from a packet given the offset of a 16 bit fnum.
****************************************************************************/
-files_struct *file_fsp(uint16 fid)
+files_struct *file_fsp(struct smb_request *req, uint16 fid)
{
files_struct *fsp;
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 43492bf8b6..baa91e2955 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -1399,7 +1399,7 @@ static void call_nt_transact_notify_change(connection_struct *conn,
return;
}
- fsp = file_fsp(SVAL(setup,4));
+ fsp = file_fsp(req, SVAL(setup,4));
filter = IVAL(setup, 0);
recursive = (SVAL(setup, 6) != 0) ? True : False;
@@ -1499,7 +1499,7 @@ static void call_nt_transact_rename(connection_struct *conn,
return;
}
- fsp = file_fsp(SVAL(params, 0));
+ fsp = file_fsp(req, SVAL(params, 0));
if (!check_fsp(conn, req, fsp)) {
return;
}
@@ -1568,7 +1568,7 @@ static void call_nt_transact_query_security_desc(connection_struct *conn,
return;
}
- fsp = file_fsp(SVAL(params,0));
+ fsp = file_fsp(req, SVAL(params,0));
if(!fsp) {
reply_doserror(req, ERRDOS, ERRbadfid);
return;
@@ -1664,7 +1664,7 @@ static void call_nt_transact_set_security_desc(connection_struct *conn,
return;
}
- if((fsp = file_fsp(SVAL(params,0))) == NULL) {
+ if((fsp = file_fsp(req, SVAL(params,0))) == NULL) {
reply_doserror(req, ERRDOS, ERRbadfid);
return;
}
@@ -1728,7 +1728,7 @@ static void call_nt_transact_ioctl(connection_struct *conn,
DEBUG(10,("call_nt_transact_ioctl: function[0x%08X] FID[0x%04X] isFSctl[0x%02X] compfilter[0x%02X]\n",
function, fidnum, isFSctl, compfilter));
- fsp=file_fsp(fidnum);
+ fsp=file_fsp(req, fidnum);
/* this check is done in each implemented function case for now
because I don't want to break anything... --metze
FSP_BELONGS_CONN(fsp,conn);*/
@@ -2035,7 +2035,7 @@ static void call_nt_transact_get_user_quota(connection_struct *conn,
}
/* maybe we can check the quota_fnum */
- fsp = file_fsp(SVAL(params,0));
+ fsp = file_fsp(req, SVAL(params,0));
if (!check_fsp_ntquota_handle(conn, req, fsp)) {
DEBUG(3,("TRANSACT_GET_USER_QUOTA: no valid QUOTA HANDLE\n"));
reply_nterror(req, NT_STATUS_INVALID_HANDLE);
@@ -2302,7 +2302,7 @@ static void call_nt_transact_set_user_quota(connection_struct *conn,
}
/* maybe we can check the quota_fnum */
- fsp = file_fsp(SVAL(params,0));
+ fsp = file_fsp(req, SVAL(params,0));
if (!check_fsp_ntquota_handle(conn, req, fsp)) {
DEBUG(3,("TRANSACT_GET_USER_QUOTA: no valid QUOTA HANDLE\n"));
reply_nterror(req, NT_STATUS_INVALID_HANDLE);
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 8727e80d5f..6edbe5ab92 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2899,7 +2899,7 @@ NTSTATUS create_file(connection_struct *conn,
* This filename is relative to a directory fid.
*/
char *parent_fname = NULL;
- files_struct *dir_fsp = file_fsp(root_dir_fid);
+ files_struct *dir_fsp = file_fsp(req, root_dir_fid);
if (dir_fsp == NULL) {
status = NT_STATUS_INVALID_HANDLE;
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 48403073f7..976611cc37 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -825,8 +825,8 @@ void reply_ioctl(struct smb_request *req)
switch (ioctl_code) {
case IOCTL_QUERY_JOB_INFO:
{
- files_struct *fsp = file_fsp(SVAL(req->inbuf,
- smb_vwv0));
+ files_struct *fsp = file_fsp(
+ req, SVAL(req->inbuf, smb_vwv0));
if (!fsp) {
reply_doserror(req, ERRDOS, ERRbadfid);
END_PROFILE(SMBioctl);
@@ -2808,7 +2808,7 @@ void reply_readbraw(struct smb_request *req)
* return a zero length response here.
*/
- fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+ fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
/*
* We have to do a check_fsp by hand here, as
@@ -2950,7 +2950,7 @@ void reply_lockread(struct smb_request *req)
return;
}
- fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+ fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
if (!check_fsp(conn, req, fsp)) {
END_PROFILE(SMBlockread);
@@ -3058,7 +3058,7 @@ void reply_read(struct smb_request *req)
return;
}
- fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+ fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
if (!check_fsp(conn, req, fsp)) {
END_PROFILE(SMBread);
@@ -3302,7 +3302,7 @@ void reply_read_and_X(struct smb_request *req)
return;
}
- fsp = file_fsp(SVAL(req->inbuf,smb_vwv2));
+ fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv2));
startpos = IVAL_TO_SMB_OFF_T(req->inbuf,smb_vwv3);
smb_maxcnt = SVAL(req->inbuf,smb_vwv5);
@@ -3450,7 +3450,7 @@ void reply_writebraw(struct smb_request *req)
return;
}
- fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+ fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
if (!check_fsp(conn, req, fsp)) {
error_to_writebrawerr(req);
END_PROFILE(SMBwritebraw);
@@ -3655,7 +3655,7 @@ void reply_writeunlock(struct smb_request *req)
return;
}
- fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+ fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
if (!check_fsp(conn, req, fsp)) {
END_PROFILE(SMBwriteunlock);
@@ -3762,7 +3762,7 @@ void reply_write(struct smb_request *req)
return;
}
- fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+ fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
if (!check_fsp(conn, req, fsp)) {
END_PROFILE(SMBwrite);
@@ -3992,7 +3992,7 @@ void reply_write_and_X(struct smb_request *req)
return;
}
- fsp = file_fsp(SVAL(req->inbuf,smb_vwv2));
+ fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv2));
startpos = IVAL_TO_SMB_OFF_T(req->inbuf,smb_vwv3);
write_through = BITSETW(req->inbuf+smb_vwv7,0);
@@ -4113,7 +4113,7 @@ void reply_lseek(struct smb_request *req)
return;
}
- fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+ fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
if (!check_fsp(conn, req, fsp)) {
return;
@@ -4199,7 +4199,7 @@ void reply_flush(struct smb_request *req)
}
fnum = SVAL(req->inbuf,smb_vwv0);
- fsp = file_fsp(fnum);
+ fsp = file_fsp(req, fnum);
if ((fnum != 0xFFFF) && !check_fsp(conn, req, fsp)) {
return;
@@ -4268,7 +4268,7 @@ void reply_close(struct smb_request *req)
return;
}
- fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+ fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
/*
* We can only use check_fsp if we know it's not a directory.
@@ -4346,7 +4346,7 @@ void reply_writeclose(struct smb_request *req)
return;
}
- fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+ fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
if (!check_fsp(conn, req, fsp)) {
END_PROFILE(SMBwriteclose);
@@ -4433,7 +4433,7 @@ void reply_lock(struct smb_request *req)
return;
}
- fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+ fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
if (!check_fsp(conn, req, fsp)) {
END_PROFILE(SMBlock);
@@ -4492,7 +4492,7 @@ void reply_unlock(struct smb_request *req)
return;
}
- fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+ fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
if (!check_fsp(conn, req, fsp)) {
END_PROFILE(SMBunlock);
@@ -4674,7 +4674,7 @@ void reply_printclose(struct smb_request *req)
return;
}
- fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+ fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
if (!check_fsp(conn, req, fsp)) {
END_PROFILE(SMBsplclose);
@@ -4816,7 +4816,7 @@ void reply_printwrite(struct smb_request *req)
return;
}
- fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+ fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
if (!check_fsp(conn, req, fsp)) {
END_PROFILE(SMBsplwr);
@@ -6644,7 +6644,7 @@ void reply_lockingX(struct smb_request *req)
return;
}
- fsp = file_fsp(SVAL(req->inbuf,smb_vwv2));
+ fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv2));
locktype = CVAL(req->inbuf,smb_vwv3);
oplocklevel = CVAL(req->inbuf,smb_vwv3+1);
num_ulocks = SVAL(req->inbuf,smb_vwv6);
@@ -7020,7 +7020,7 @@ void reply_setattrE(struct smb_request *req)
return;
}
- fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+ fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
if(!fsp || (fsp->conn != conn)) {
reply_doserror(req, ERRDOS, ERRbadfid);
@@ -7131,7 +7131,7 @@ void reply_getattrE(struct smb_request *req)
return;
}
- fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
+ fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv0));
if(!fsp || (fsp->conn != conn)) {
reply_doserror(req, ERRDOS, ERRbadfid);
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 1e2095a3ea..850552eca6 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -3298,7 +3298,7 @@ cap_low = 0x%x, cap_high = 0x%x\n",
* but we didn't use the last 6 bytes for now
* --metze
*/
- fsp = file_fsp(SVAL(params,0));
+ fsp = file_fsp(req, SVAL(params,0));
if (!check_fsp_ntquota_handle(conn, req,
fsp)) {
@@ -3873,7 +3873,7 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
return;
}
- fsp = file_fsp(SVAL(params,0));
+ fsp = file_fsp(req, SVAL(params,0));
info_level = SVAL(params,2);
DEBUG(3,("call_trans2qfilepathinfo: TRANSACT2_QFILEINFO: level = %d\n", info_level));
@@ -6582,7 +6582,7 @@ static void call_trans2setfilepathinfo(connection_struct *conn,
return;
}
- fsp = file_fsp(SVAL(params,0));
+ fsp = file_fsp(req, SVAL(params,0));
/* Basic check for non-null fsp. */
if (!check_fsp_open(conn, req, fsp)) {
return;
@@ -7250,7 +7250,7 @@ static void call_trans2ioctl(connection_struct *conn,
unsigned int max_data_bytes)
{
char *pdata = *ppdata;
- files_struct *fsp = file_fsp(SVAL(req->inbuf,smb_vwv15));
+ files_struct *fsp = file_fsp(req, SVAL(req->inbuf,smb_vwv15));
/* check for an invalid fid before proceeding */