diff options
author | Stefan Metzmacher <metze@samba.org> | 2020-05-19 14:10:21 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2020-07-08 15:54:39 +0000 |
commit | 60d7f059a40457ab9fa01f1bf2eeddc1c3b7d0ab (patch) | |
tree | 5db1aefbe1658a90ec51712813c84dfe13a54daf | |
parent | a1e5b8c77c1e409e22d72086853ba4a5331e279c (diff) | |
download | samba-60d7f059a40457ab9fa01f1bf2eeddc1c3b7d0ab.tar.gz |
s3:smbd: remove unused session,tcon parameters from smbd_smb2_send_oplock_break()
They are no longer used. However we'll make use of
op->compat->vuid in the next commits, as the session id should be part
of oplock breaks.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11897
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
-rw-r--r-- | source3/smbd/globals.h | 2 | ||||
-rw-r--r-- | source3/smbd/smb2_break.c | 36 | ||||
-rw-r--r-- | source3/smbd/smb2_server.c | 2 |
3 files changed, 12 insertions, 28 deletions
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h index 2a963439bef..3f7aa94ce3c 100644 --- a/source3/smbd/globals.h +++ b/source3/smbd/globals.h @@ -258,8 +258,6 @@ NTSTATUS smbd_smb2_request_done_ex(struct smbd_smb2_request *req, smbd_smb2_request_done_ex(req, NT_STATUS_OK, body, dyn, __location__) NTSTATUS smbd_smb2_send_oplock_break(struct smbXsrv_connection *xconn, - struct smbXsrv_session *session, - struct smbXsrv_tcon *tcon, struct smbXsrv_open *op, uint8_t oplock_level); NTSTATUS smbd_smb2_send_lease_break(struct smbXsrv_connection *xconn, diff --git a/source3/smbd/smb2_break.c b/source3/smbd/smb2_break.c index ae6b9214b22..2ab55aa8720 100644 --- a/source3/smbd/smb2_break.c +++ b/source3/smbd/smb2_break.c @@ -444,9 +444,6 @@ void send_break_message_smb2(files_struct *fsp, { NTSTATUS status; struct smbXsrv_connection *xconn = NULL; - struct smbXsrv_session *session = NULL; - struct timeval tv = timeval_current(); - NTTIME now = timeval_to_nttime(&tv); /* * TODO: in future we should have a better algorithm @@ -455,28 +452,21 @@ void send_break_message_smb2(files_struct *fsp, */ xconn = fsp->conn->sconn->client->connections; - status = smb2srv_session_lookup_conn(xconn, - fsp->vuid, - now, - &session); - if (NT_STATUS_EQUAL(status, NT_STATUS_USER_SESSION_DELETED) || - (session == NULL)) - { - - DEBUG(10,("send_break_message_smb2: skip oplock break " - "for file %s, %s, smb2 level %u session %llu not found\n", - fsp_str_dbg(fsp), - fsp_fnum_dbg(fsp), - (unsigned int)break_to, - (unsigned long long)fsp->vuid)); + if (!NT_STATUS_IS_OK(fsp->op->status)) { + DBG_DEBUG("skip oplock break for file %s, %s, " + "smb2 level %u fsp status=%s\n", + fsp_str_dbg(fsp), + fsp_fnum_dbg(fsp), + (unsigned int)break_to, + nt_errstr(fsp->op->status)); return; } - DEBUG(10,("send_break_message_smb2: sending oplock break " - "for file %s, %s, smb2 level %u\n", - fsp_str_dbg(fsp), - fsp_fnum_dbg(fsp), - (unsigned int)break_to )); + DBG_DEBUG("sending oplock break " + "for file %s, %s, smb2 level %u\n", + fsp_str_dbg(fsp), + fsp_fnum_dbg(fsp), + (unsigned int)break_to); if (fsp->oplock_type == LEASE_OPLOCK) { uint32_t break_flags = 0; @@ -500,8 +490,6 @@ void send_break_message_smb2(files_struct *fsp, smb2_oplock_level = (break_to & SMB2_LEASE_READ) ? SMB2_OPLOCK_LEVEL_II : SMB2_OPLOCK_LEVEL_NONE; status = smbd_smb2_send_oplock_break(xconn, - session, - fsp->conn->tcon, fsp->op, smb2_oplock_level); } diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c index 42805ab9760..86354098b95 100644 --- a/source3/smbd/smb2_server.c +++ b/source3/smbd/smb2_server.c @@ -3573,8 +3573,6 @@ static NTSTATUS smbd_smb2_send_break(struct smbXsrv_connection *xconn, } NTSTATUS smbd_smb2_send_oplock_break(struct smbXsrv_connection *xconn, - struct smbXsrv_session *session, - struct smbXsrv_tcon *tcon, struct smbXsrv_open *op, uint8_t oplock_level) { |