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)
Oct 3 2024, 8:20 AM
Unknown Object (File)
Oct 3 2024, 1:11 AM
Unknown Object (File)
Oct 2 2024, 11:55 PM
Unknown Object (File)
Oct 2 2024, 8:25 PM
Unknown Object (File)
Sep 30 2024, 6:22 PM
Unknown Object (File)
Sep 30 2024, 11:29 AM
Unknown Object (File)
Sep 24 2024, 7:03 AM
Unknown Object (File)
Sep 22 2024, 1:24 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