Page MenuHomeFreeBSD

Implement O_BENEATH flag for openat(2).
AbandonedPublic

Authored by jonathan on Jun 14 2015, 4:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 16, 9:41 AM
Unknown Object (File)
Thu, Mar 28, 11:30 PM
Unknown Object (File)
Mar 17 2024, 4:08 AM
Unknown Object (File)
Feb 23 2024, 10:34 AM
Unknown Object (File)
Feb 15 2024, 9:53 AM
Unknown Object (File)
Dec 31 2023, 3:38 PM
Unknown Object (File)
Dec 31 2023, 2:05 PM
Unknown Object (File)
Dec 20 2023, 12:00 AM
Subscribers
None

Details

Reviewers
None
Summary

Capsicum restricts capability-mode and capability-relative path lookups
to be "strictly relative": we do not permit absolute paths or ".." in
path resolution for these cases. This functionality could be useful in
non-Capsicum applications as well, and it has been proposed for inclusion
in Linux as a step along the way to Capsicum in Linux.

This commit would add the O_BENEATH flag for use in openat(2) to enable
"strict relative" lookups with unrestricted file descriptors (i.e., not
Capsicum capabilities) outside of capability mode. The only difference
from the Capsicum behaviour is that O_BENEATH would cause errno to be
EPERM rather than ECAPMODE or ENOTCAPABLE. If O_BENEATH is used together
with capability mode or a directory capability, EPERM is returned, since
the usermode application has explicitly requested the new behaviour.

Approved by: rwatson (mentor)

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage

Event Timeline

jonathan retitled this revision from to Implement O_BENEATH flag for openat(2)..
jonathan updated this object.
jonathan edited the test plan for this revision. (Show Details)

User error: I meant to type arc diff --update D2808