From 6355d2e68a5d959f38fcab12af46e61013abd72a Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 26 Mar 2012 13:00:53 +0200 Subject: s3: Pass "filter" instead of "notify_entry" to inotify_map This makes the potential modification a bit more obvious --- source3/smbd/notify_inotify.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/notify_inotify.c b/source3/smbd/notify_inotify.c index a074d019d9..fb972beafb 100644 --- a/source3/smbd/notify_inotify.c +++ b/source3/smbd/notify_inotify.c @@ -328,14 +328,14 @@ static const struct { {FILE_NOTIFY_CHANGE_SECURITY, IN_ATTRIB} }; -static uint32_t inotify_map(struct notify_entry *e) +static uint32_t inotify_map(uint32_t *filter) { int i; uint32_t out=0; for (i=0;ifilter) { + if (inotify_mapping[i].notify_mask & *filter) { out |= inotify_mapping[i].inotify_mask; - e->filter &= ~inotify_mapping[i].notify_mask; + *filter &= ~inotify_mapping[i].notify_mask; } } return out; @@ -395,7 +395,7 @@ NTSTATUS inotify_watch(struct sys_notify_context *ctx, in = talloc_get_type(ctx->private_data, struct inotify_private); - mask = inotify_map(e); + mask = inotify_map(&e->filter); if (mask == 0) { /* this filter can't be handled by inotify */ return NT_STATUS_INVALID_PARAMETER; -- cgit