Re: [PATCH v4 2/5] fs: Add fchmodat2()

From
dalias@libc.org <dalias@libc.org>
Date
2023-07-27 16:33:16
Also in
linux-alpha, linux-arch, linux-fsdevel, linux-m68k, linux-mips, linux-s390, linux-sh, linuxppc-dev, lkml, sparclinux
Reply to
David Laight, 2023-07-27
On Thu, Jul 27, 2023 at 09:01:06AM +0000, David Laight wrote:
From: Aleksa Sarai
quoted
Sent: 25 July 2023 17:36
....
quoted
We almost certainly want to support AT_EMPTY_PATH at the same time.
Otherwise userspace will still need to go through /proc when trying to
chmod a file handle they have.
That can't be allowed.

Just because a process has a file open and write access to
the directory that contains it doesn't mean they are allowed
to change the file permissions.

They also need directory search access from a directory
they have open through to the containing directory.
Am I missing something? How is this different from fchmod?

Rich
Thread (45 messages) 45 messages, 12 authors, last reply 2023-07-28
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help