summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-06-19 16:31:59 +0200
committerVolker Lendecke <vl@samba.org>2008-06-19 18:51:37 +0200
commit49ca8efa9199ba21e3a41cbe4abbea1ca4974d0e (patch)
tree0e0aff5a6f9e86f301257739e9f8019e241f977d
parent769646efc6d334976e75cf6476acfe1089e986dd (diff)
downloadsamba-49ca8efa9199ba21e3a41cbe4abbea1ca4974d0e.tar.gz
samba-49ca8efa9199ba21e3a41cbe4abbea1ca4974d0e.tar.bz2
samba-49ca8efa9199ba21e3a41cbe4abbea1ca4974d0e.zip
Remove the "current_user" arg from check_fsp
check_fsp only used the vuid struct member anyway, and this is available in the smb_request structure as well. (This used to be commit 8d364c4c3311b406847158fc37e9208d298cf8ba)
-rw-r--r--source3/include/proto.h4
-rw-r--r--source3/smbd/nttrans.c2
-rw-r--r--source3/smbd/reply.c38
-rw-r--r--source3/smbd/trans2.c8
4 files changed, 26 insertions, 26 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 70eaf325be..0ca8693e57 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -10089,9 +10089,9 @@ size_t srvstr_get_path(TALLOC_CTX *ctx,
int flags,
NTSTATUS *err);
bool check_fsp_open(connection_struct *conn, struct smb_request *req,
- files_struct *fsp, struct current_user *user);
+ files_struct *fsp);
bool check_fsp(connection_struct *conn, struct smb_request *req,
- files_struct *fsp, struct current_user *user);
+ files_struct *fsp);
bool fsp_belongs_conn(connection_struct *conn, struct smb_request *req,
files_struct *fsp, struct current_user *user);
void reply_special(char *inbuf);
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index cbe1299cf7..61562b2de2 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -1520,7 +1520,7 @@ static void call_nt_transact_rename(connection_struct *conn,
}
fsp = file_fsp(SVAL(params, 0));
- if (!check_fsp(conn, req, fsp, &current_user)) {
+ if (!check_fsp(conn, req, fsp)) {
return;
}
srvstr_get_path_wcard(ctx, params, req->flags2, &new_name, params+4,
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 2506ff97e9..4427ba2ebd 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -327,13 +327,13 @@ size_t srvstr_get_path(TALLOC_CTX *ctx,
****************************************************************************/
bool check_fsp_open(connection_struct *conn, struct smb_request *req,
- files_struct *fsp, struct current_user *user)
+ files_struct *fsp)
{
if (!(fsp) || !(conn)) {
reply_nterror(req, NT_STATUS_INVALID_HANDLE);
return False;
}
- if (((conn) != (fsp)->conn) || user->vuid != (fsp)->vuid) {
+ if (((conn) != (fsp)->conn) || req->vuid != (fsp)->vuid) {
reply_nterror(req, NT_STATUS_INVALID_HANDLE);
return False;
}
@@ -346,9 +346,9 @@ bool check_fsp_open(connection_struct *conn, struct smb_request *req,
****************************************************************************/
bool check_fsp(connection_struct *conn, struct smb_request *req,
- files_struct *fsp, struct current_user *user)
+ files_struct *fsp)
{
- if (!check_fsp_open(conn, req, fsp, user)) {
+ if (!check_fsp_open(conn, req, fsp)) {
return False;
}
if ((fsp)->is_directory) {
@@ -2924,7 +2924,7 @@ void reply_lockread(struct smb_request *req)
fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
- if (!check_fsp(conn, req, fsp, &current_user)) {
+ if (!check_fsp(conn, req, fsp)) {
END_PROFILE(SMBlockread);
return;
}
@@ -3032,7 +3032,7 @@ void reply_read(struct smb_request *req)
fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
- if (!check_fsp(conn, req, fsp, &current_user)) {
+ if (!check_fsp(conn, req, fsp)) {
END_PROFILE(SMBread);
return;
}
@@ -3287,7 +3287,7 @@ void reply_read_and_X(struct smb_request *req)
return;
}
- if (!check_fsp(conn, req, fsp, &current_user)) {
+ if (!check_fsp(conn, req, fsp)) {
END_PROFILE(SMBreadX);
return;
}
@@ -3425,7 +3425,7 @@ void reply_writebraw(struct smb_request *req)
}
fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
- if (!check_fsp(conn, req, fsp, &current_user)) {
+ if (!check_fsp(conn, req, fsp)) {
error_to_writebrawerr(req);
END_PROFILE(SMBwritebraw);
return;
@@ -3631,7 +3631,7 @@ void reply_writeunlock(struct smb_request *req)
fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
- if (!check_fsp(conn, req, fsp, &current_user)) {
+ if (!check_fsp(conn, req, fsp)) {
END_PROFILE(SMBwriteunlock);
return;
}
@@ -3738,7 +3738,7 @@ void reply_write(struct smb_request *req)
fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
- if (!check_fsp(conn, req, fsp, &current_user)) {
+ if (!check_fsp(conn, req, fsp)) {
END_PROFILE(SMBwrite);
return;
}
@@ -3968,7 +3968,7 @@ void reply_write_and_X(struct smb_request *req)
startpos = IVAL_TO_SMB_OFF_T(req->inbuf,smb_vwv3);
write_through = BITSETW(req->inbuf+smb_vwv7,0);
- if (!check_fsp(conn, req, fsp, &current_user)) {
+ if (!check_fsp(conn, req, fsp)) {
END_PROFILE(SMBwriteX);
return;
}
@@ -4087,7 +4087,7 @@ void reply_lseek(struct smb_request *req)
fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
- if (!check_fsp(conn, req, fsp, &current_user)) {
+ if (!check_fsp(conn, req, fsp)) {
return;
}
@@ -4173,7 +4173,7 @@ void reply_flush(struct smb_request *req)
fnum = SVAL(req->inbuf,smb_vwv0);
fsp = file_fsp(fnum);
- if ((fnum != 0xFFFF) && !check_fsp(conn, req, fsp, &current_user)) {
+ if ((fnum != 0xFFFF) && !check_fsp(conn, req, fsp)) {
return;
}
@@ -4320,7 +4320,7 @@ void reply_writeclose(struct smb_request *req)
fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
- if (!check_fsp(conn, req, fsp, &current_user)) {
+ if (!check_fsp(conn, req, fsp)) {
END_PROFILE(SMBwriteclose);
return;
}
@@ -4407,7 +4407,7 @@ void reply_lock(struct smb_request *req)
fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
- if (!check_fsp(conn, req, fsp, &current_user)) {
+ if (!check_fsp(conn, req, fsp)) {
END_PROFILE(SMBlock);
return;
}
@@ -4466,7 +4466,7 @@ void reply_unlock(struct smb_request *req)
fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
- if (!check_fsp(conn, req, fsp, &current_user)) {
+ if (!check_fsp(conn, req, fsp)) {
END_PROFILE(SMBunlock);
return;
}
@@ -4650,7 +4650,7 @@ void reply_printclose(struct smb_request *req)
fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
- if (!check_fsp(conn, req, fsp, &current_user)) {
+ if (!check_fsp(conn, req, fsp)) {
END_PROFILE(SMBsplclose);
return;
}
@@ -4790,7 +4790,7 @@ void reply_printwrite(struct smb_request *req)
fsp = file_fsp(SVAL(req->inbuf,smb_vwv0));
- if (!check_fsp(conn, req, fsp, &current_user)) {
+ if (!check_fsp(conn, req, fsp)) {
END_PROFILE(SMBsplwr);
return;
}
@@ -6624,7 +6624,7 @@ void reply_lockingX(struct smb_request *req)
lock_timeout = IVAL(req->inbuf,smb_vwv4);
large_file_format = (locktype & LOCKING_ANDX_LARGE_FILES)?True:False;
- if (!check_fsp(conn, req, fsp, &current_user)) {
+ if (!check_fsp(conn, req, fsp)) {
END_PROFILE(SMBlockingX);
return;
}
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 72688bbd66..3a59be115e 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -3871,7 +3871,7 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
}
/* Initial check for valid fsp ptr. */
- if (!check_fsp_open(conn, req, fsp, &current_user)) {
+ if (!check_fsp_open(conn, req, fsp)) {
return;
}
@@ -3914,7 +3914,7 @@ static void call_trans2qfilepathinfo(connection_struct *conn,
/*
* Original code - this is an open file.
*/
- if (!check_fsp(conn, req, fsp, &current_user)) {
+ if (!check_fsp(conn, req, fsp)) {
return;
}
@@ -6568,7 +6568,7 @@ static void call_trans2setfilepathinfo(connection_struct *conn,
fsp = file_fsp(SVAL(params,0));
/* Basic check for non-null fsp. */
- if (!check_fsp_open(conn, req, fsp, &current_user)) {
+ if (!check_fsp_open(conn, req, fsp)) {
return;
}
info_level = SVAL(params,2);
@@ -6621,7 +6621,7 @@ static void call_trans2setfilepathinfo(connection_struct *conn,
/*
* Original code - this is an open file.
*/
- if (!check_fsp(conn, req, fsp, &current_user)) {
+ if (!check_fsp(conn, req, fsp)) {
return;
}