• Jan Kara's avatar
    audit: Receive unmount event · b5fed474
    Jan Kara authored
    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: default avatarJan Kara <jack@suse.cz>
    Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
    b5fed474
audit_watch.c 14.5 KB