mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Michael Kerrisk" <mtk.manpages@googlemail.com>
To: "Jamie Lokier" <jamie@shareable.org>
Cc: "Al Viro" <viro@zeniv.linux.org.uk>,
	"Miklos Szeredi" <miklos@szeredi.hu>,
	drepper@redhat.com, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org, linux-man@vger.kernel.org,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] utimensat() non-conformances and fixes [v3]
Date: Tue, 3 Jun 2008 13:39:07 +0200	[thread overview]
Message-ID: <cfd18e0f0806030439n5a11fa4aocd6251ffab66b6dd@mail.gmail.com> (raw)
In-Reply-To: <20080603113018.GA27955@shareable.org>

On Tue, Jun 3, 2008 at 1:30 PM, Jamie Lokier <jamie@shareable.org> wrote:
> Michael Kerrisk wrote:
>> > FWIW, I very much doubt that you are right wrt required
>> > permissions, though.  AFAICS, intent here is "if you can write to
>> > file, you can touch the timestamps anyway" and having descriptor
>> > opened for write gives that, current permissions be damned.
>>
>> The standard is pretty clear on this point:
>>
>> [[
>> Only a process with the effective user ID equal to the user ID of the
>> file, or with write access to the file, or with appropriate privileges
>> may use futimens( ) or utimensat( ) with a null pointer as the times
>> argument or with both tv_nsec fields set to the special value
>> UTIME_NOW.
>> ]]
>>
>> The crucial words here are "a process ... with write access to the
>> file" -- in other words, the permissions are determined by the
>> process's credentials, not by the access mode of the file descriptor.
>> I was not 100% sure on that to start with, so I did check it out with
>> one of the folk at The Open Group, to make sure of my understanding.
>
> Is there anything else where the file descriptor's access mode allows
> doing things on Linux, but the standard requires a permissions check
> each time?

Jamie,

I can't think of examples offhand -- but I'm also not quite sure what
your question is about.  Could you say a little more?

Cheers,

Michael


-- 
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

  reply	other threads:[~2008-06-03 11:39 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-16  8:31 [PATCH] utimensat() non-conformances and fixes -- version 2 Michael Kerrisk
2008-05-16  8:34 ` Michael Kerrisk
2008-05-16 16:59 ` Miklos Szeredi
2008-05-17 19:57   ` Michael Kerrisk
2008-05-19  9:50     ` Miklos Szeredi
2008-05-19 10:12       ` Miklos Szeredi
2008-05-19 12:24       ` Michael Kerrisk
2008-05-19 13:17         ` Miklos Szeredi
2008-05-30 15:34   ` [PATCH] utimensat() non-conformances and fixes [v3] Michael Kerrisk
2008-05-30 16:37     ` Miklos Szeredi
2008-05-30 18:24       ` Michael Kerrisk
2008-05-30 19:22         ` Miklos Szeredi
2008-05-30 19:32           ` Matthew Wilcox
2008-05-30 20:08             ` Miklos Szeredi
2008-05-30 19:43         ` Michael Kerrisk
2008-05-30 20:17           ` Miklos Szeredi
2008-05-31  5:28             ` Michael Kerrisk
2008-05-30 20:17         ` Andrew Morton
2008-05-31  5:44           ` Michael Kerrisk
2008-06-03 11:05     ` Michael Kerrisk
2008-06-03 11:13       ` Miklos Szeredi
2008-06-03 11:22         ` Al Viro
2008-06-03 11:27           ` Michael Kerrisk
2008-06-03 11:30             ` Jamie Lokier
2008-06-03 11:39               ` Michael Kerrisk [this message]
2008-06-03 11:49                 ` Al Viro
2008-06-03 11:58                   ` Al Viro
2008-06-03 12:01                   ` Jamie Lokier
2008-06-03 12:08                     ` Al Viro
2008-06-03 12:10                       ` Jamie Lokier
2008-06-03 12:16           ` Miklos Szeredi
2008-06-03 13:05             ` Al Viro
2008-06-03 11:52         ` 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=cfd18e0f0806030439n5a11fa4aocd6251ffab66b6dd@mail.gmail.com \
    --to=mtk.manpages@googlemail.com \
    --cc=akpm@linux-foundation.org \
    --cc=drepper@redhat.com \
    --cc=jamie@shareable.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --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

all inboxes | Powered by JetHome®