From 7cfafaf190643eb28fc95d21a02a4e5e529e16d1 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 22 Mar 2018 10:54:41 +0100 Subject: [PATCH] smbd: explain that/why we use the raw tevent_context for update_write_time_handler() Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- source3/smbd/fileio.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c index cde6a057ccd..1fe806e058d 100644 --- a/source3/smbd/fileio.c +++ b/source3/smbd/fileio.c @@ -232,9 +232,17 @@ void trigger_write_time_update(struct files_struct *fsp) DEBUG(5, ("Update write time %d usec later on %s\n", delay, fsp_str_dbg(fsp))); - /* trigger the update 2 seconds later */ + /* + * trigger the update 2 seconds later + * + * Note that update_write_time_handler() + * => fsp_flush_write_time_update() + * won't do any SMB_VFS calls and don't + * need impersonation. So we use the + * raw event context for this. + */ fsp->update_write_time_event = - tevent_add_timer(fsp->conn->sconn->ev_ctx, NULL, + tevent_add_timer(fsp->conn->sconn->raw_ev_ctx, NULL, timeval_current_ofs_usec(delay), update_write_time_handler, fsp); }