Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1621566
| From | Colin Walters <walters@verbum.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/2] vfs: implement fchmodat2() syscall |
| Date | 2017-04-11 21:10 +0200 |
| Message-ID | <tv9kS-2Ej-13@gated-at.bofh.it> (permalink) |
| References | <tfTrH-7ry-3@gated-at.bofh.it> <tfUH8-8cC-35@gated-at.bofh.it> <tv8f8-1JB-17@gated-at.bofh.it> <tv8f8-1JB-15@gated-at.bofh.it> <tv8oN-22T-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH 1/2] vfs: implement fchmodat2() syscall Colin Walters <walters@verbum.org> - 2017-04-11 20:00 +0200
Re: [PATCH 1/2] vfs: implement fchmodat2() syscall Eric Blake <eblake@redhat.com> - 2017-04-11 20:00 +0200
Re: [PATCH 1/2] vfs: implement fchmodat2() syscall Eric Blake <eblake@redhat.com> - 2017-04-11 20:10 +0200
Re: [PATCH 1/2] vfs: implement fchmodat2() syscall Eric Blake <eblake@redhat.com> - 2017-04-11 20:10 +0200
Re: [PATCH 1/2] vfs: implement fchmodat2() syscall Colin Walters <walters@verbum.org> - 2017-04-11 21:10 +0200
Re: [PATCH 1/2] vfs: implement fchmodat2() syscall Greg Kurz <groug@kaod.org> - 2017-04-19 16:10 +0200
csiph-web