Re: [PATCH] afs: proc cells and rootcell are writeable
From: David Howells
Date: Thu Jan 30 2014 - 19:31:55 EST
David Howells <dhowells@xxxxxxxxxx> wrote:
> > > I think this is a pretty strong argument. Counter-arguments, anybody?
> >
> > Yes. CAP_DAC_READ_SEARCH.
>
> No, it would seem unlikely it's that, but I guess there's another capability
> override because the process is owned by root.
CAP_DAC_OVERRIDE, I think.
int generic_permission(struct inode *inode, int mask)
{
...
/*
* Read/write DACs are always overridable.
* Executable DACs are overridable when there is
* at least one exec bit set.
*/
if (!(mask & MAY_EXEC) || (inode->i_mode & S_IXUGO))
if (inode_capable(inode, CAP_DAC_OVERRIDE))
return 0;
...
}
David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/