mirror of
https://github.com/samba-team/samba.git
synced 2025-02-23 09:57:40 +03:00
s3:smbd: use smbXsrv_open_close() instead of smbXsrv_open_update()
This makes sure we store the correct disconnect_time for disconnected durable handles. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
parent
8adbd1cf75
commit
f0e6a9be00
@ -769,10 +769,20 @@ static NTSTATUS close_normal_file(struct smb_request *req, files_struct *fsp,
|
|||||||
fsp->op,
|
fsp->op,
|
||||||
&new_cookie);
|
&new_cookie);
|
||||||
if (NT_STATUS_IS_OK(tmp)) {
|
if (NT_STATUS_IS_OK(tmp)) {
|
||||||
|
struct timeval tv;
|
||||||
|
NTTIME now;
|
||||||
|
|
||||||
|
if (req != NULL) {
|
||||||
|
tv = req->request_time;
|
||||||
|
} else {
|
||||||
|
tv = timeval_current();
|
||||||
|
}
|
||||||
|
now = timeval_to_nttime(&tv);
|
||||||
|
|
||||||
data_blob_free(&fsp->op->global->backend_cookie);
|
data_blob_free(&fsp->op->global->backend_cookie);
|
||||||
fsp->op->global->backend_cookie = new_cookie;
|
fsp->op->global->backend_cookie = new_cookie;
|
||||||
|
|
||||||
tmp = smbXsrv_open_update(fsp->op);
|
tmp = smbXsrv_open_close(fsp->op, now);
|
||||||
}
|
}
|
||||||
if (!NT_STATUS_IS_OK(tmp)) {
|
if (!NT_STATUS_IS_OK(tmp)) {
|
||||||
is_durable = false;
|
is_durable = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user