Re: Question about FANOTIFY_ACCESS_PERMISSIONS and SECURITY

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

 



On Tue, Mar 20, 2018 at 9:58 PM, Jan Kara <jack@xxxxxxx> wrote:
> Hi Amir!
>
> On Mon 19-03-18 06:40:30, Amir Goldstein wrote:
>> Do you know why config FANOTIFY_ACCESS_PERMISSIONS depends on SECURITY?
>>
>> I didn't find any obvious dependency in the code and
>> FANOTIFY_ACCESS_PERMISSIONS compiles when I remove SECURITY dependency,
>> but FANOTIFY_ACCESS_PERMISSIONS tests failed.
>
> No idea at the first moment. On a second though I believe the reason for
> this is that fsnotify_perm() gets called from security_file_open() which is
> non-trivial only in CONFIG_SECURITY is set... Which explains why things are
> the way you observe.
>

Wow. That's completely unneeded.
We should call fsnotify_perm() directly from do_dentry_open(), just like
fsnotify_open(). Can also make fsnotify_perm() NOOP if
FANOTIFY_ACCESS_PERMISSIONS
is not defined. Will send a patch.

Thanks,
Amir.



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

  Powered by Linux