mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Colin Walters <walters@verbum.org>
To: Eric Blake <eblake@redhat.com>, Greg Kurz <groug@kaod.org>,
	viro@zeniv.linux.org.uk
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] vfs: implement fchmodat2() syscall
Date: Tue, 11 Apr 2017 15:09:40 -0400	[thread overview]
Message-ID: <1491937780.536443.941636728.319DEAF0@webmail.messagingengine.com> (raw)
In-Reply-To: <9005445d-2a56-effd-55da-b3bc700c5cf2@redhat.com>

On Tue, Apr 11, 2017, at 02:07 PM, Eric Blake wrote:
> 
> A good idea on the surface. But reading the man page of openat(), the
> section on O_PATH says:
>    The  file
>               itself  is not opened, and other file operations (e.g.,
> read(2),
>               write(2), fchmod(2), fchown(2), fgetxattr(2), mmap(2))
> fail with
>               the error EBADF.

Right, though more topically I'd have expected
fchmodat() (not fchmod()) to take AT_EMPTY_PATH,
just like fstatat() does.

But it doesn't appear to be supported...oh, even at
the syscall level, interesting.   Ah, I see, glibc does:

int
fchmodat (int fd, const char *file, mode_t mode, int flag)
{
  if (flag & ~AT_SYMLINK_NOFOLLOW)
    return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
...
}

And indeed the syscall doesn't have flags, bringing us back
to the start here.   Sorry, that seems obvious in retrospect,
but I was "working forwards" from the O_PATH userspace API
mindset.

  parent reply	other threads:[~2017-04-11 19:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-28 17:03 Greg Kurz
2017-02-28 17:03 ` [PATCH 2/2] x86: wire up " Greg Kurz
2017-03-01  9:00   ` kbuild test robot
2017-02-28 18:23 ` [PATCH 1/2] vfs: implement " Eric Blake
2017-02-28 18:41   ` Greg Kurz
2017-02-28 18:59     ` Eric Blake
2017-04-11 17:52   ` Colin Walters
2017-04-11 17:55     ` Eric Blake
2017-04-11 18:07       ` Eric Blake
2017-04-11 18:08         ` Eric Blake
2017-04-11 19:09         ` Colin Walters [this message]
2017-04-19 12:45           ` Greg Kurz
2017-03-01  9:01 ` Michael Kerrisk
2017-04-11 11:39   ` Greg Kurz
2017-04-11 12:04     ` Greg Kurz

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=1491937780.536443.941636728.319DEAF0@webmail.messagingengine.com \
    --to=walters@verbum.org \
    --cc=eblake@redhat.com \
    --cc=groug@kaod.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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®