smbd: use req->xconn->client->raw_ev_ctx for schedule_deferred_open_message_smb()
authorStefan Metzmacher <metze@samba.org>
Thu, 22 Mar 2018 09:54:41 +0000 (10:54 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 18 Jun 2018 06:59:19 +0000 (08:59 +0200)
process_smb() will redo the impersonation anyway.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/process.c

index 53365b5f034521856bc1679bbf7ece957d8435b6..99693ed1315b98360ca164439b33d061d703b9a2 100644 (file)
@@ -822,7 +822,14 @@ bool schedule_deferred_open_message_smb(struct smbXsrv_connection *xconn,
                                "scheduling mid %llu\n",
                                (unsigned long long)mid ));
 
-                       te = tevent_add_timer(pml->sconn->ev_ctx,
+                       /*
+                        * smbd_deferred_open_timer() calls
+                        * process_smb() to redispatch the request
+                        * including the required impersonation.
+                        *
+                        * So we can just use the raw tevent_context.
+                        */
+                       te = tevent_add_timer(xconn->client->raw_ev_ctx,
                                              pml,
                                              timeval_zero(),
                                              smbd_deferred_open_timer,