Skip to content

Commit b5fed47

Browse files
jankarapcmoore
authored andcommitted
audit: Receive unmount event
Although audit_watch_handle_event() can handle FS_UNMOUNT event, it is not part of AUDIT_FS_WATCH mask and thus such event never gets to audit_watch_handle_event(). Thus fsnotify marks are deleted by fsnotify subsystem on unmount without audit being notified about that which leads to a strange state of existing audit rules with dead fsnotify marks. Add FS_UNMOUNT to the mask of events to be received so that audit can clean up its state accordingly. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Paul Moore <paul@paul-moore.com>
1 parent d76036a commit b5fed47

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎kernel/audit_watch.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ static struct fsnotify_group *audit_watch_group;
6666

6767
/* fsnotify events we care about. */
6868
#define AUDIT_FS_WATCH (FS_MOVE | FS_CREATE | FS_DELETE | FS_DELETE_SELF |\
69-
FS_MOVE_SELF | FS_EVENT_ON_CHILD)
69+
FS_MOVE_SELF | FS_EVENT_ON_CHILD | FS_UNMOUNT)
7070

7171
static void audit_free_parent(struct audit_parent *parent)
7272
{

0 commit comments

Comments
 (0)