[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <44D9B4C4.90304@sw.ru>
Date: Wed, 09 Aug 2006 14:11:16 +0400
From: Kirill Korotaev <dev@...ru>
To: Al Viro <viro@....linux.org.uk>
CC: Andrew Morton <akpm@...l.org>, viro@...iv.linux.org.uk,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Mishin Dmitry <dim@...nvz.org>
Subject: Re: [PATCH] move IMMUTABLE|APPEND checks to notify_change()
Al Viro wrote:
> On Tue, Aug 08, 2006 at 03:44:07PM +0400, Kirill Korotaev wrote:
>
>>[PATCH] move IMMUTABLE|APPEND checks to notify_change()
>>
>>This patch moves lots of IMMUTABLE and APPEND flag checks
>>scattered all around to more logical place in notify_change().
>
>
> NAK. For example, you are allowed to do unames(file, NULL) on
> any file you own or can write to, whether it's append-only or
> not. With your change that gets -EPERM.
>
Does such check in notify_change() looks better for you?
notify_change():
if (IS_IMMUTABLE(inode))
return -EPERM;
if (IS_APPEND(inode) &&
(ia_valid & ~(ATTR_CTIME | ATTR_MTIME | ATTR_ATIME)))
return -EPERM;
Thanks,
Kirill
-
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