Revert "smbd: explain that/why we use the raw tevent_context for linux_oplock_signal_...
authorRalph Boehme <slow@samba.org>
Thu, 27 Dec 2018 14:21:06 +0000 (15:21 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 11 Jan 2019 22:11:17 +0000 (23:11 +0100)
This reverts commit dc517b20f60a156d73fdd551557eb1d4366dfdeb.

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/oplock_linux.c

index 76760ff..9292a33 100644 (file)
@@ -125,12 +125,6 @@ static void linux_oplock_signal_handler(struct tevent_context *ev_ctx,
        int fd = info->si_fd;
        files_struct *fsp;
 
        int fd = info->si_fd;
        files_struct *fsp;
 
-       /*
-        * This function doesn't expect any specific impersonation, as it only
-        * sends messages to other smbd processes. And messaging_send_iov_from()
-        * already handles EACCES.
-        */
-
        fsp = file_find_fd(sconn, fd);
        if (fsp == NULL) {
                DEBUG(0,("linux_oplock_signal_handler: failed to find fsp for file fd=%d (file was closed ?)\n", fd ));
        fsp = file_find_fd(sconn, fd);
        if (fsp == NULL) {
                DEBUG(0,("linux_oplock_signal_handler: failed to find fsp for file fd=%d (file was closed ?)\n", fd ));
@@ -241,13 +235,7 @@ struct kernel_oplocks *linux_init_kernel_oplocks(struct smbd_server_connection *
        ctx->ops = &linux_koplocks;
        ctx->private_data = sconn;
 
        ctx->ops = &linux_koplocks;
        ctx->private_data = sconn;
 
-       /*
-        * linux_oplock_signal_handler() only
-        * sends messages to other smbd processes
-        * and doesn't require any impersonation.
-        * So we can just use the raw tevent_context.
-        */
-       se = tevent_add_signal(sconn->raw_ev_ctx,
+       se = tevent_add_signal(sconn->ev_ctx,
                               ctx,
                               RT_SIGNAL_LEASE, SA_SIGINFO,
                               linux_oplock_signal_handler,
                               ctx,
                               RT_SIGNAL_LEASE, SA_SIGINFO,
                               linux_oplock_signal_handler,