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 ));
ctx->ops = &linux_koplocks;
ctx->private_data = sconn;
- se = tevent_add_signal(sconn->ev_ctx,
+ /*
+ * 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,
ctx,
RT_SIGNAL_LEASE, SA_SIGINFO,
linux_oplock_signal_handler,