diff options
Diffstat (limited to 'kernel/audit_watch.c')
-rw-r--r-- | kernel/audit_watch.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c index 22831c4d369c..70b4554d2fbe 100644 --- a/kernel/audit_watch.c +++ b/kernel/audit_watch.c | |||
@@ -465,35 +465,27 @@ void audit_remove_watch_rule(struct audit_krule *krule) | |||
465 | } | 465 | } |
466 | } | 466 | } |
467 | 467 | ||
468 | static bool audit_watch_should_send_event(struct fsnotify_group *group, struct inode *inode, | ||
469 | struct fsnotify_mark *inode_mark, | ||
470 | struct fsnotify_mark *vfsmount_mark, | ||
471 | __u32 mask, void *data, int data_type) | ||
472 | { | ||
473 | return true; | ||
474 | } | ||
475 | |||
476 | /* Update watch data in audit rules based on fsnotify events. */ | 468 | /* Update watch data in audit rules based on fsnotify events. */ |
477 | static int audit_watch_handle_event(struct fsnotify_group *group, | 469 | static int audit_watch_handle_event(struct fsnotify_group *group, |
470 | struct inode *to_tell, | ||
478 | struct fsnotify_mark *inode_mark, | 471 | struct fsnotify_mark *inode_mark, |
479 | struct fsnotify_mark *vfsmount_mark, | 472 | struct fsnotify_mark *vfsmount_mark, |
480 | struct fsnotify_event *event) | 473 | u32 mask, void *data, int data_type, |
474 | const unsigned char *dname, u32 cookie) | ||
481 | { | 475 | { |
482 | struct inode *inode; | 476 | struct inode *inode; |
483 | __u32 mask = event->mask; | ||
484 | const char *dname = event->file_name; | ||
485 | struct audit_parent *parent; | 477 | struct audit_parent *parent; |
486 | 478 | ||
487 | parent = container_of(inode_mark, struct audit_parent, mark); | 479 | parent = container_of(inode_mark, struct audit_parent, mark); |
488 | 480 | ||
489 | BUG_ON(group != audit_watch_group); | 481 | BUG_ON(group != audit_watch_group); |
490 | 482 | ||
491 | switch (event->data_type) { | 483 | switch (data_type) { |
492 | case (FSNOTIFY_EVENT_PATH): | 484 | case (FSNOTIFY_EVENT_PATH): |
493 | inode = event->path.dentry->d_inode; | 485 | inode = ((struct path *)data)->dentry->d_inode; |
494 | break; | 486 | break; |
495 | case (FSNOTIFY_EVENT_INODE): | 487 | case (FSNOTIFY_EVENT_INODE): |
496 | inode = event->inode; | 488 | inode = (struct inode *)data; |
497 | break; | 489 | break; |
498 | default: | 490 | default: |
499 | BUG(); | 491 | BUG(); |
@@ -512,11 +504,7 @@ static int audit_watch_handle_event(struct fsnotify_group *group, | |||
512 | } | 504 | } |
513 | 505 | ||
514 | static const struct fsnotify_ops audit_watch_fsnotify_ops = { | 506 | static const struct fsnotify_ops audit_watch_fsnotify_ops = { |
515 | .should_send_event = audit_watch_should_send_event, | ||
516 | .handle_event = audit_watch_handle_event, | 507 | .handle_event = audit_watch_handle_event, |
517 | .free_group_priv = NULL, | ||
518 | .freeing_mark = NULL, | ||
519 | .free_event_priv = NULL, | ||
520 | }; | 508 | }; |
521 | 509 | ||
522 | static int __init audit_watch_init(void) | 510 | static int __init audit_watch_init(void) |