summaryrefslogtreecommitdiff
path: root/source3/smbd/notify_inotify.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-03-26 13:00:53 +0200
committerVolker Lendecke <vl@samba.org>2012-03-26 13:00:53 +0200
commit6355d2e68a5d959f38fcab12af46e61013abd72a (patch)
tree7e10ae17b77036c85e2ecd30e167edcf75bec8a6 /source3/smbd/notify_inotify.c
parent6804e46811dd13cfd405f7c48a3dc2bc6501d75c (diff)
downloadsamba-6355d2e68a5d959f38fcab12af46e61013abd72a.tar.gz
samba-6355d2e68a5d959f38fcab12af46e61013abd72a.tar.bz2
samba-6355d2e68a5d959f38fcab12af46e61013abd72a.zip
s3: Pass "filter" instead of "notify_entry" to inotify_map
This makes the potential modification a bit more obvious
Diffstat (limited to 'source3/smbd/notify_inotify.c')
-rw-r--r--source3/smbd/notify_inotify.c8
1 files changed, 4 insertions, 4 deletions
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;i<ARRAY_SIZE(inotify_mapping);i++) {
- if (inotify_mapping[i].notify_mask & e->filter) {
+ 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;