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)
May 16 2024, 11:54 PM
Unknown Object (File)
May 13 2024, 9:29 AM
Unknown Object (File)
May 8 2024, 2:03 AM
Unknown Object (File)
May 4 2024, 12:11 PM
Unknown Object (File)
May 4 2024, 1:13 AM
Unknown Object (File)
Apr 30 2024, 4:52 PM
Unknown Object (File)
Mar 6 2024, 8:17 PM
Unknown Object (File)
Dec 20 2023, 3:13 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.