public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kirill Korotaev <dev@sw.ru>
To: Al Viro <viro@ftp.linux.org.uk>
Cc: Andrew Morton <akpm@osdl.org>,
	viro@zeniv.linux.org.uk,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Mishin Dmitry <dim@openvz.org>
Subject: Re: [PATCH] move IMMUTABLE|APPEND checks to notify_change()
Date: Wed, 09 Aug 2006 14:11:16 +0400	[thread overview]
Message-ID: <44D9B4C4.90304@sw.ru> (raw)
In-Reply-To: <20060808203814.GO29920@ftp.linux.org.uk>

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

      parent reply	other threads:[~2006-08-09 10:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-08 11:44 [PATCH] move IMMUTABLE|APPEND checks to notify_change() Kirill Korotaev
2006-08-08 20:38 ` Al Viro
2006-08-09  7:15   ` Dmitry Mishin
2006-08-09 14:11     ` Al Viro
2006-08-09  9:07   ` Kirill Korotaev
2006-08-09 10:11   ` Kirill Korotaev [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44D9B4C4.90304@sw.ru \
    --to=dev@sw.ru \
    --cc=akpm@osdl.org \
    --cc=dim@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ftp.linux.org.uk \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox