Page MenuHomeFreeBSD

capsicum-test: Update for O_BENEATH removal
ClosedPublic

Authored by arichardson on Mar 2 2021, 6:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 4, 6:41 AM
Unknown Object (File)
Fri, Oct 2, 4:19 PM
Unknown Object (File)
Wed, Sep 30, 11:06 PM
Unknown Object (File)
Wed, Sep 30, 11:05 PM
Unknown Object (File)
Wed, Sep 30, 7:55 PM
Unknown Object (File)
Tue, Sep 29, 4:52 PM
Unknown Object (File)
Mon, Sep 28, 8:23 PM
Unknown Object (File)
Wed, Sep 23, 6:13 PM
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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.