Revert "smbd: use sconn->root_ev_ctx for brl_timeout_fn()"
authorRalph Boehme <slow@samba.org>
Thu, 27 Dec 2018 14:20:58 +0000 (15:20 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 11 Jan 2019 22:11:17 +0000 (23:11 +0100)
This reverts commit 182991c26c8149c79b13a277b9822efc49fd1df0.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/smbd/blocking.c
source3/smbd/smb2_lock.c

index c281aae619de4416d5f72d2c3659a4dd84b7dcc2..6cbf5c03e932757ca2adf9358f62959704877acb 100644 (file)
@@ -135,11 +135,7 @@ static bool recalc_brl_timeout(struct smbd_server_connection *sconn)
                    (int)from_now.tv_sec, (int)from_now.tv_usec));
        }
 
-       /*
-        * brl_timeout_fn() calls change_to_root_user()
-        * so we can use sconn->root_ev_ctx.
-        */
-       sconn->smb1.locks.brl_timeout = tevent_add_timer(sconn->root_ev_ctx,
+       sconn->smb1.locks.brl_timeout = tevent_add_timer(sconn->ev_ctx,
                                                         NULL, next_timeout,
                                                         brl_timeout_fn, sconn);
        if (sconn->smb1.locks.brl_timeout == NULL) {
index 3cc591089a42a5df7f0f51edf7247874b08b9c2a..a05470e52e4a923dd162afbb8a3a9e85eeacaeec 100644 (file)
@@ -568,12 +568,8 @@ static bool recalc_smb2_brl_timeout(struct smbd_server_connection *sconn)
                        (int)from_now.tv_sec, (int)from_now.tv_usec));
        }
 
-       /*
-        * brl_timeout_fn() calls change_to_root_user()
-        * so we can use sconn->root_ev_ctx.
-        */
        sconn->smb2.locks.brl_timeout = tevent_add_timer(
-                               sconn->root_ev_ctx,
+                               sconn->ev_ctx,
                                NULL,
                                next_timeout,
                                brl_timeout_fn,