[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFz2FLCcNpLz_ey4YaKsLov+Mpjdt4onXVmw5n3z7o_TRg@mail.gmail.com>
Date: Tue, 4 Feb 2014 08:17:26 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Steven Whitehouse <swhiteho@...hat.com>
Cc: Al Viro <viro@...iv.linux.org.uk>,
Christoph Hellwig <hch@...radead.org>,
Ilya Dryomov <ilya.dryomov@...tank.com>,
Sage Weil <sage@...tank.com>, Dave Jones <davej@...hat.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
ceph-devel@...r.kernel.org,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Guangliang Zhao <lucienchao@...il.com>,
Li Wang <li.wang@...ntykylin.com>, zheng.z.yan@...el.com
Subject: Re: [PATCH v2] ceph: fix posix ACL hooks
On Tue, Feb 4, 2014 at 3:33 AM, Steven Whitehouse <swhiteho@...hat.com> wrote:
>
> The other question that I have relating to that side of things, is why
> security_inode_permission() is called from __inode_permission() rather
> than from generic_permission() ? Maybe there is a good reason, but I
> can't immediately see what it is at the moment.
"generic_permission()" is just a helper that implements the default
UNIX permissions, and won't necessarily even be called. A filesystem
could decide not to call it at all, and in fact there are cases that
don't (eg coda or the bad_inode case).
The inode_permission() class of helpers, in contrast, is what gets
called by the VFS layer itself. So if you want to catch all permission
checks (and that would be security_inode_permission()) then you need
to catch it there.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists