Re: [PATCH] fanotify: do not allow setting FAN_RENAME on non-dir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 7, 2022 at 8:57 AM Amir Goldstein <amir73il@xxxxxxxxx> wrote:
>
> On Fri, May 6, 2022 at 12:12 PM Jan Kara <jack@xxxxxxx> wrote:
> >
> > On Fri 06-05-22 04:46:26, Amir Goldstein wrote:
> > > The desired sematics of this action are not clear, so for now deny
> > > this action.  We may relax it when we decide on the semantics and
> > > implement them.
> > >
> > > Fixes: 8cc3b1ccd930 ("fanotify: wire up FAN_RENAME event")
> > > Link: https://lore.kernel.org/linux-fsdevel/20220505133057.zm5t6vumc4xdcnsg@xxxxxxxxxx/
> > > Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx>
> >
> > Thanks guys. I've merged the fix to my tree (fast_track branch) and will
> > push it to Linus on Monday once it gets at least some exposure to
> > auto-testers.
>
> Actually, I made a mistake.
> It should not return -EINVAL, it should return -ENOTDIR, because
> the error is the object not the syscall argument values.
>
> Going forward, when Matthew implements FAN_RENAME on
> non-dir, the error should be changed to -EPERM (for unpriv caller).
> This will allow better documentation of behavior in kernel 5.17 and
> newer kernels.
>
> Can you please fix that before sending to Linus?
>

Actually, nevermind, I have thought of another issue so posting v2.
I think we should deny all dirent events on non-dir with
FAN_REPORT_TARGET_FID.

This is what happens when posting patches from airports :-P

Thanks,
Amir.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux