Page MenuHomeFreeBSD

WIP: Update capsicum-test after O_BENEATH changes.
AbandonedPublic

Authored by arichardson on Feb 15 2021, 4:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 15, 12:39 AM
Unknown Object (File)
Nov 3 2025, 11:47 PM
Unknown Object (File)
Nov 3 2025, 11:45 PM
Unknown Object (File)
Nov 3 2025, 11:45 PM
Unknown Object (File)
Nov 3 2025, 11:44 PM
Unknown Object (File)
Oct 19 2025, 2:49 AM
Unknown Object (File)
Oct 11 2025, 11:00 AM
Unknown Object (File)
Oct 11 2025, 11:00 AM

Details

Reviewers
kib
markj
emaste
Group Reviewers
capsicum
Summary

I'm not convinced this behaviour is correct. I feel like cap_enter()
should have the same effect whether O_BENEATH is passed or not.

Test Plan

This updates the openat test for the current behaviour, but I think we probably want to change the kernel instead?

Diff Detail

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

Event Timeline

I'm not convinced this behaviour is correct.

It is not. In capability mode we must return ENOTCAPABLE for openat(sub_fd, "../subdir/...", ...)

emaste requested changes to this revision.Feb 15 2021, 6:12 PM
This revision now requires changes to proceed.Feb 15 2021, 6:12 PM

I'll submit the contrib/capsicum-test/capsicum-test.h debugging changes upstream and will close this once the kernel has been updated.
I guess adding the extra EXPECT_FAIL checks also makes sense upstream.

I am not sure what is going on with this test. With patched kernel I see faiures on open of relative symlinks that go out of the topping directory, as I would suppose things should work. But the tests are not marked for failure.

Anyway, please see D28698 D28699. I believe a discussion of how to proceed is required.

Update checks. Note: this is for testing only, I will make any changes upstream