Page MenuHomeFreeBSD

rename(2): document capability mode errors
ClosedPublic

Authored by emaste on Sep 12 2017, 1:10 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 6 2024, 8:17 PM
Unknown Object (File)
Dec 20 2023, 3:13 AM
Unknown Object (File)
Nov 11 2023, 2:11 AM
Unknown Object (File)
Nov 10 2023, 8:22 PM
Unknown Object (File)
Nov 8 2023, 5:07 AM
Unknown Object (File)
Nov 7 2023, 1:25 PM
Unknown Object (File)
Nov 7 2023, 9:31 AM
Unknown Object (File)
Nov 6 2023, 4:23 AM

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Hrm, although the ENOTCAPABLE errors should really be augmented with "... and the process is in capability mode."

Er, why is rename / renameat with AT_FDCWD not allowed in capability mode?

In D12339#255993, @cem wrote:

Er, why is rename / renameat with AT_FDCWD not allowed in capability mode?

AT_FDCWD is never allowed in capability mode. You have to be explicitly granted rights to any FD

This revision is now accepted and ready to land.Sep 15 2017, 2:18 PM
In D12339#255993, @cem wrote:

Er, why is rename / renameat with AT_FDCWD not allowed in capability mode?

If AT_FDCWD were permitted in capability mode, that would provide an implicit capability for the current working directory. It is desirable to be able to create sandboxes that don't have access to any directories (even the current working directory), and it's also not clear what rights should be associated with AT_FDCWD, so the clearest thing is to disallow AT_FDCWD. If a process in capability mode requires access to the current working directory, it can be passed in as an explicit capability.

This revision was automatically updated to reflect the committed changes.