From a2d6aa829faa65df14ee566e455e807693cc2bd9 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 31 Jul 2007 12:05:40 +0000 Subject: r24102: Pass the fid instead of inbuf and an offset to file_fsp. This removes the buf==NULL condition in file_fsp(), but wherever it is called we do have a buffer anyway. Volker (This used to be commit d70a1f82fed64fa332f16407bea7c6671f48c59a) --- source3/smbd/trans2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/smbd/trans2.c') diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index b5077ed8ff..d455a12fa1 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -2859,7 +2859,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(params,0); + fsp = file_fsp(SVAL(params,0)); if (!CHECK_NTQUOTA_HANDLE_OK(fsp,conn)) { DEBUG(3,("TRANSACT_GET_USER_QUOTA: no valid QUOTA HANDLE\n")); return ERROR_NT(NT_STATUS_INVALID_HANDLE); @@ -3341,7 +3341,7 @@ static int call_trans2qfilepathinfo(connection_struct *conn, char *inbuf, char * max_data_bytes); } - fsp = file_fsp(params,0); + fsp = file_fsp(SVAL(params,0)); info_level = SVAL(params,2); DEBUG(3,("call_trans2qfilepathinfo: TRANSACT2_QFILEINFO: level = %d\n", info_level)); @@ -5860,7 +5860,7 @@ static int call_trans2setfilepathinfo(connection_struct *conn, return ERROR_NT(NT_STATUS_INVALID_PARAMETER); } - fsp = file_fsp(params,0); + fsp = file_fsp(SVAL(params,0)); info_level = SVAL(params,2); if(fsp && (fsp->is_directory || fsp->fh->fd == -1)) { @@ -6460,7 +6460,7 @@ static int call_trans2ioctl(connection_struct *conn, char* inbuf, char* outbuf, unsigned int max_data_bytes) { char *pdata = *ppdata; - files_struct *fsp = file_fsp(inbuf,smb_vwv15); + files_struct *fsp = file_fsp(SVAL(inbuf,smb_vwv15)); /* check for an invalid fid before proceeding */ -- cgit