TALLOC_FREE(state);
return;
}
- tevent_schedule_immediate(im, sconn->ev_ctx, do_break_to_none, state);
+
+ /*
+ * do_break_to_none() only operates on the
+ * locking.tdb and send network packets to
+ * the client. That doesn't require any
+ * impersonation, so we just use the
+ * raw tevent context here.
+ */
+ tevent_schedule_immediate(im, sconn->raw_ev_ctx, do_break_to_none, state);
}
static void send_break_to_none(struct messaging_context *msg_ctx,
struct share_mode_lock *lck;
struct share_mode_data *d;
+ /*
+ * Note this function doesn't run under any specific impersonation and
+ * is not expected to call any SMB_VFS operation!
+ */
+
lck = get_existing_share_mode_lock(talloc_tos(), state->id);
if (lck == NULL) {
DEBUG(1, ("%s: failed to lock share mode entry for file %s.\n",