s3:smbd:smb2: fix setting of scavenge timeout when reconnecting durable handles
authorMichael Adam <obnox@samba.org>
Thu, 18 Apr 2013 11:11:03 +0000 (13:11 +0200)
committerMichael Adam <obnox@samba.org>
Thu, 18 Apr 2013 11:15:10 +0000 (13:15 +0200)
The bug fixed with this commit led to reconnected durable handles
having a disconnect timeout of 0 msec. This fix re-establishes the
original timeout for the reconnected handle.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
source3/smbd/smb2_create.c

index c239ccb1432b2c07841feeefdf5bcd01888d93ca..fe0c4e48d29afe0bf374f9e3e53678f4ca5a893b 100644 (file)
@@ -839,11 +839,10 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
                        op->status = NT_STATUS_OK;
                        op->global->disconnect_time = 0;
 
-                       status = smbXsrv_open_update(op);
-                       if (!NT_STATUS_IS_OK(status)) {
-                               tevent_req_nterror(req, status);
-                               return tevent_req_post(req, ev);
-                       }
+                       /* save the timout for later update */
+                       durable_timeout_msec = op->global->durable_timeout_msec;
+
+                       update_open = true;
 
                        info = FILE_WAS_OPENED;
                } else {