summaryrefslogtreecommitdiff
path: root/fs/notify/fanotify/fanotify_user.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2009-12-18 05:24:27 +0300
committerEric Paris <eparis@redhat.com>2010-07-28 17:58:56 +0400
commit32c3263221bd63316815286dccacdc7abfd7f3c4 (patch)
tree9dad12d5b966cf42d7506e10fb2e3c8d955415d3 /fs/notify/fanotify/fanotify_user.c
parent22aa425dec9e47051624714ae283eb2b6a473013 (diff)
downloadlinux-32c3263221bd63316815286dccacdc7abfd7f3c4.tar.xz
fanotify: Add pids to events
Pass the process identifiers of the triggering processes to fanotify listeners: this information is useful for event filtering and logging. Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'fs/notify/fanotify/fanotify_user.c')
-rw-r--r--fs/notify/fanotify/fanotify_user.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
index cf9c30009825..66e38fc052b2 100644
--- a/fs/notify/fanotify/fanotify_user.c
+++ b/fs/notify/fanotify/fanotify_user.c
@@ -103,6 +103,7 @@ static ssize_t fill_event_metadata(struct fsnotify_group *group,
metadata->event_len = FAN_EVENT_METADATA_LEN;
metadata->vers = FANOTIFY_METADATA_VERSION;
metadata->mask = fanotify_outgoing_mask(event->mask);
+ metadata->pid = pid_vnr(event->tgid);
metadata->fd = create_fd(group, event);
return metadata->fd;