Re: [PATCH v4 2/5] fs: Add fchmodat2()
Andreas Schwab <[email protected]>
| Newsgroups | gmane.linux.ports.m68k,gmane.linux.kernel,gmane.linux.kernel.api,gmane.linux.file-systems,gmane.linux.ports.alpha,gmane.linux.kernel.cross-arch,gmane.linux.ports.ia64,gmane.linux.ports.mips,gmane.linux.ports.parisc,gmane.linux.ports.sh.devel,gmane.linux.ports.ppc64.devel,gmane.linux.ports.sparc |
|---|---|
| Message-ID | <[email protected]> |
On Jul 27 2023, David Laight wrote: > From: Aleksa Sarai >> Sent: 25 July 2023 17:36 > ... >> 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. IIUC, fchmodat2(fd, "", m, AT_EMPTY_PATH) is equivalent to fchmod(fd, m). With that, new architectures only need to implement the fchmodat2 syscall to cover all chmod variants. -- Andreas Schwab, [email protected] GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."