[LTP] [PATCH 4/4] syscalls/fanotify15: verify fid for dirent events
Cyril Hrubis
chrubis@suse.cz
Tue Apr 16 17:00:15 CEST 2019
Hi!
> > Can put this code into an header in the fanotify/ directory along with
> > the event_t structure definiton so that we do not carry two copies of
> > nearly identical code.
>
> Correct, but I would rather leave the event_t structure private to the test
> because it may have other fields in future tests of similar pattern...
>
> >
> > If we passed a pointer to the event_t structure instead of the index we
> > can call this function in a loop in the get_object_stats() in
> > fanotify13, right?
> >
>
> ...so I'd prefer to pass a pointer to fsid and file_handle to helper instead,
> something like:
> void fanotify_get_fid(const char *path, __kernel_fsid_t *fsid, and
> struct file_handle *handle)
Sounds good to me as well.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list