summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-02-13 08:26:43 -0500
committerStefan Metzmacher <metze@samba.org>2013-02-18 15:53:36 +0100
commitf0e6a9be00e441e50f0087c543e1b7c9012d126f (patch)
tree7a6ba11b7d7c870623c1b7fed65bcf1028e432d7 /source3
parent8adbd1cf75492869f7fd1935eb211a070ef924cc (diff)
downloadsamba-f0e6a9be00e441e50f0087c543e1b7c9012d126f.tar.gz
samba-f0e6a9be00e441e50f0087c543e1b7c9012d126f.tar.bz2
samba-f0e6a9be00e441e50f0087c543e1b7c9012d126f.zip
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>
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/close.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source3/smbd/close.c b/source3/smbd/close.c
index 9b988e07c6..9e7ccc7c05 100644
--- a/source3/smbd/close.c
+++ b/source3/smbd/close.c
@@ -769,10 +769,20 @@ static NTSTATUS close_normal_file(struct smb_request *req, files_struct *fsp,
fsp->op,
&new_cookie);
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);
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)) {
is_durable = false;