[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Vnode scope implementation
On Sat, Jul 4, 2009 at 8:45 PM, Christoph
> David Holland wrote:
>> On Sat, Jul 04, 2009 at 08:14:19PM +0300, Elad Efrat wrote:
>>> Once the back-end is in place, I'll follow-up with some more diffs
>>> transitioning various file-systems to use kauth(9) in different places
>>> -- access, chflags, chmod, etc.
>> I'd like to see some examples of what this is expected to look like.
>> > /*
>> > + * Vnode scope - actions.
>> > + */
>> > +#define KAUTH_VNODE_READ_DATA (1 << 0)
>> > +#define KAUTH_VNODE_LIST_DIRECTORY KAUTH_VNODE_READ_DATA
>> > +#define KAUTH_VNODE_WRITE_DATA (1 << 1)
>> > +#define KAUTH_VNODE_ADD_FILE KAUTH_VNODE_WRITE_DATA
>> > +#define KAUTH_VNODE_EXECUTE (1 << 2)
>> > +#define KAUTH_VNODE_SEARCH KAUTH_VNODE_EXECUTE
>> > +
>> > +#define KAUTH_VNODE_ACCESS (1 << 31)
>> I assume there's some reason these need to be bits rather than an
>> enumeration; however, when you go to implement you'll find you've left
>> a few things off here.
> If these need to be really bits then please use __BIT(0), __BIT(1),
> __BIT(2) and __BIT(31)
They need to be bits. I'll use the __BIT() macro.
Main Index |
Thread Index |