1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s3:smb2_glue: remove chained fsps from all connections in remove_smb2_chained_fsp()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
Stefan Metzmacher 2014-09-16 07:50:41 +02:00 committed by Michael Adam
parent 6e28bf174b
commit 04a9b0a7b2

View File

@ -78,15 +78,22 @@ size_t smbd_smb2_unread_bytes(struct smbd_smb2_request *req)
void remove_smb2_chained_fsp(files_struct *fsp) void remove_smb2_chained_fsp(files_struct *fsp)
{ {
struct smbd_server_connection *sconn = fsp->conn->sconn; struct smbd_server_connection *sconn = fsp->conn->sconn;
struct smbXsrv_connection *xconn = sconn->conn; struct smbXsrv_connection *xconn = NULL;
struct smbd_smb2_request *smb2req;
for (smb2req = xconn->smb2.requests; smb2req; smb2req = smb2req->next) { if (sconn->client != NULL) {
if (smb2req->compat_chain_fsp == fsp) { xconn = sconn->client->connections;
smb2req->compat_chain_fsp = NULL; }
}
if (smb2req->smb1req && smb2req->smb1req->chain_fsp == fsp) { for (; xconn != NULL; xconn = xconn->next) {
smb2req->smb1req->chain_fsp = NULL; struct smbd_smb2_request *smb2req;
for (smb2req = xconn->smb2.requests; smb2req; smb2req = smb2req->next) {
if (smb2req->compat_chain_fsp == fsp) {
smb2req->compat_chain_fsp = NULL;
}
if (smb2req->smb1req && smb2req->smb1req->chain_fsp == fsp) {
smb2req->smb1req->chain_fsp = NULL;
}
} }
} }
} }