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
F144368371: D28687.id83998.diff
Sun, Feb 8, 2:17 AM
Unknown Object (File)
Fri, Jan 30, 5:47 PM
Unknown Object (File)
Thu, Jan 29, 5:08 AM
Unknown Object (File)
Thu, Jan 29, 5:08 AM
Unknown Object (File)
Dec 30 2025, 7:31 PM
Unknown Object (File)
Dec 13 2025, 9:48 PM
Unknown Object (File)
Nov 15 2025, 12:39 AM
Unknown Object (File)
Nov 3 2025, 11:47 PM

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