Page MenuHomeFreeBSD

capsicum-test: Update for O_BENEATH removal
ClosedPublic

Authored by arichardson on Mar 2 2021, 6:26 PM.
Tags
None
Referenced Files
F151138522: D29016.id84985.diff
Mon, Apr 6, 8:40 AM
Unknown Object (File)
Sun, Apr 5, 11:47 AM
Unknown Object (File)
Fri, Apr 3, 5:05 AM
Unknown Object (File)
Thu, Apr 2, 11:24 AM
Unknown Object (File)
Feb 16 2026, 11:28 AM
Unknown Object (File)
Feb 8 2026, 11:40 PM
Unknown Object (File)
Jan 24 2026, 10:43 PM
Unknown Object (File)
Dec 28 2025, 10:36 AM
Subscribers

Details

Summary

Update the tests to check O_RESOLVE_BENEATH instead.
If this looks reasonable, I'll try to upstream this change.
This keeps a compat fallback for O_BENEATH since the Linux port still
has/had O_BENEATH with "no .., no absolute paths" semantics.

Test Plan

/usr/tests/sys/capsicum/capsicum-test -u 977 passes and runs the O_RESOLVE_BENEATH tests.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 37507
Build 34396: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Mar 2 2021, 6:29 PM
contrib/capsicum-test/openat.cc
357

This is weird, because if you redefine O_RESOLVE_BENEATH as O_BENEATH, this could succeed (depending on the cwd).

contrib/capsicum-test/openat.cc
357

I think there could be other interesting errors if cwd == /. I guess the testsuite should check that the cwd is not inside / or /etc.