mirror of
https://github.com/samba-team/samba.git
synced 2025-03-20 22:50:26 +03:00
smbXsrv_client: call smb2srv_client_connection_{pass,drop}() before dbwrap_watched_watch_send()
dbwrap_watched_watch_send() should typically be the last thing to call before the db record is unlocked, as it's not that easy to undo. In future we want to recover from smb2srv_client_connection_{pass,drop}() returning NT_STATUS_OBJECT_NAME_NOT_FOUND and it would add complexity if would need to undo dbwrap_watched_watch_send() at that point. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15200 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> (cherry picked from commit 56c597bc2b29dc3e555f737ba189f521d0e31e8c)
This commit is contained in:
parent
abc48aec20
commit
fd4c80fcc6
@ -612,6 +612,20 @@ static void smb2srv_client_mc_negprot_next(struct tevent_req *req)
|
||||
tevent_req_set_callback(subreq, smb2srv_client_mc_negprot_done, req);
|
||||
}
|
||||
|
||||
if (procid_is_local(&global->server_id)) {
|
||||
status = smb2srv_client_connection_pass(state->smb2req,
|
||||
global);
|
||||
if (tevent_req_nterror(req, status)) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
status = smb2srv_client_connection_drop(state->smb2req,
|
||||
global);
|
||||
if (tevent_req_nterror(req, status)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If the record changed, but we are not happy with the change yet,
|
||||
* we better remove ourself from the waiter list
|
||||
@ -643,22 +657,7 @@ static void smb2srv_client_mc_negprot_next(struct tevent_req *req)
|
||||
}
|
||||
tevent_req_set_callback(subreq, smb2srv_client_mc_negprot_watched, req);
|
||||
|
||||
if (procid_is_local(&global->server_id)) {
|
||||
status = smb2srv_client_connection_pass(state->smb2req,
|
||||
global);
|
||||
TALLOC_FREE(global);
|
||||
if (tevent_req_nterror(req, status)) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
status = smb2srv_client_connection_drop(state->smb2req,
|
||||
global);
|
||||
TALLOC_FREE(global);
|
||||
if (tevent_req_nterror(req, status)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
TALLOC_FREE(global);
|
||||
TALLOC_FREE(state->db_rec);
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user