audit: convert audit watches to use fsnotify instead of inotify

Audit currently uses inotify to pin inodes in core and to detect when
watched inodes are deleted or unmounted.  This patch uses fsnotify instead
of inotify.

Signed-off-by: Eric Paris <eparis@redhat.com>
This commit is contained in:
Eric Paris
2009-12-17 20:12:04 -05:00
parent ae7b8f4108
commit e9fd702a58
2 changed files with 156 additions and 65 deletions

View File

@@ -58,9 +58,12 @@
FS_MOVED_FROM | FS_MOVED_TO | FS_CREATE |\
FS_DELETE)
#define FS_MOVE (FS_MOVED_FROM | FS_MOVED_TO)
/* listeners that hard code group numbers near the top */
#define DNOTIFY_GROUP_NUM UINT_MAX
#define INOTIFY_GROUP_NUM (DNOTIFY_GROUP_NUM-1)
#define AUDIT_WATCH_GROUP_NUM (DNOTIFY_GROUP_NUM-1)
#define INOTIFY_GROUP_NUM (AUDIT_WATCH_GROUP_NUM-1)
struct fsnotify_group;
struct fsnotify_event;