Thread (11 messages) 11 messages, 5 authors, 2019-07-17

Re: [PATCH v2 2/4] Add fchmodat4(), a new syscall

flat view

From: Rich Felker <dalias@libc.org>
Date: 2019-07-17 02:51:04
Also in: linux-alpha, linux-api, linux-arch, linux-fsdevel, linux-mips, linux-s390, linux-sh, lkml, sparclinux

On Tue, Jul 16, 2019 at 06:27:17PM -0700, Palmer Dabbelt wrote:
man 3p says that fchmodat() takes a flags argument, but the Linux
syscall does not.  There doesn't appear to be a good userspace
workaround for this issue but the implementation in the kernel is pretty
straight-forward.  The specific use case where the missing flags came up
was WRT a fuse filesystem implemenation, but the functionality is pretty
generic so I'm assuming there would be other use cases.
Note that we do have a workaround in musl libc with O_PATH and
/proc/self/fd, but a syscall that allows a proper fix with the ugly
workaround only in the fallback path for old kernels will be much
appreciated!

What about also doing a new SYS_faccessat4 with working AT_EACCESS
flag? The workaround we have to do for it is far worse.

Rich
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help