• Amir Goldstein's avatar
    fanotify: add support for FAN_REPORT_NAME · 929943b3
    Amir Goldstein authored
    Introduce a new fanotify_init() flag FAN_REPORT_NAME.  It requires the
    flag FAN_REPORT_DIR_FID and there is a constant for setting both flags
    named FAN_REPORT_DFID_NAME.
    
    For a group with flag FAN_REPORT_NAME, the parent fid and name are
    reported for directory entry modification events (create/detete/move)
    and for events on non-directory objects.
    
    Events on directories themselves are reported with their own fid and
    "." as the name.
    
    The parent fid and name are reported with an info record of type
    FAN_EVENT_INFO_TYPE_DFID_NAME, similar to the way that parent fid is
    reported with into type FAN_EVENT_INFO_TYPE_DFID, but with an appended
    null terminated name string.
    
    Link: https://lore.kernel.org/r/20200716084230.30611-21-amir73il@gmail.comSigned-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
    Signed-off-by: default avatarJan Kara <jack@suse.cz>
    929943b3
fanotify.c 21.7 KB