From: "Michael Kerrisk" <mtk.manpages@googlemail.com>
To: "Miklos Szeredi" <miklos@szeredi.hu>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
hch@lst.de, viro@zeniv.linux.org.uk, jamie@shareable.org,
drepper@redhat.com, linux-fsdevel@vger.kernel.org,
subrata@linux.vnet.ibm.com
Subject: Re: [parch 4/4] vfs: utimensat(): fix write access check for futimens()
Date: Wed, 4 Jun 2008 10:43:12 +0200 [thread overview]
Message-ID: <cfd18e0f0806040143x6343194bl2b7b0111cc84375f@mail.gmail.com> (raw)
In-Reply-To: <E1K3lxO-0007t2-2d@pomaz-ex.szeredi.hu>
On Wed, Jun 4, 2008 at 7:54 AM, Miklos Szeredi <miklos@szeredi.hu> wrote:
>> At which point the "if (f)" and the "else" branches become equivalent
>> (the nameidata isn't interesting in the other case either). So that
>> could be written as:
>>
>> if (!is_owner_or_cap(inode)) {
>> error = permission(inode, MAY_WRITE, NULL);
>> if (error)
>> goto mnt_drop_write_and_out;
>> }
>
> And also the IS_IMMUTABLE() check can be removed, since it's checked
> by permission(MAY_WRITE) anyway.
I'm not sure that that is true, because immutability applies
regardless of capabilities or ownership, right?
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html
next prev parent reply other threads:[~2008-06-04 8:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-03 22:25 [parch 4/4] vfs: utimensat(): fix write access check for futimens() Michael Kerrisk
2008-06-04 4:41 ` Miklos Szeredi
2008-06-04 5:54 ` Miklos Szeredi
2008-06-04 8:43 ` Michael Kerrisk [this message]
2008-06-04 8:44 ` Miklos Szeredi
2008-06-04 8:40 ` Michael Kerrisk
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=cfd18e0f0806040143x6343194bl2b7b0111cc84375f@mail.gmail.com \
--to=mtk.manpages@googlemail.com \
--cc=akpm@linux-foundation.org \
--cc=drepper@redhat.com \
--cc=hch@lst.de \
--cc=jamie@shareable.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=subrata@linux.vnet.ibm.com \
--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;
as well as URLs for NNTP newsgroup(s).