[PATCH] JFFS2: Add parameter to reserve disk space for root
Daniel Drake
dsd at laptop.org
Tue May 15 14:06:34 EDT 2012
On Tue, May 15, 2012 at 9:06 AM, David Woodhouse <dwmw2 at infradead.org> wrote:
> On Tue, 2012-04-10 at 22:22 +0100, Daniel Drake wrote:
>>
>> + /* Always allow root */
>> + if (current_fsuid() == 0 || current_fsgid() == 0)
>> + return 1;
>
> I've changed that to if (capable(CAP_SYS_RESOURCE)) rather than having a
> hard-coded check for the root user, which is usually the wrong thing to
> do. Please test.
Yes, this works fine.
Thanks!
Daniel
More information about the linux-mtd
mailing list