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 c281aae..6cbf5c0 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 3cc5910..a05470e 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,