Page MenuHomeFreeBSD

Fix fget_only_user() to return ENOTCAPABLE on a failed capsicum check
ClosedPublic

Authored by arichardson on Feb 15 2021, 8:25 PM.
Tags
None
Referenced Files
F106160462: D28691.diff
Thu, Dec 26, 9:30 AM
Unknown Object (File)
Tue, Dec 3, 10:23 PM
Unknown Object (File)
Tue, Dec 3, 10:23 PM
Unknown Object (File)
Tue, Dec 3, 10:22 PM
Unknown Object (File)
Tue, Dec 3, 10:02 PM
Unknown Object (File)
Oct 18 2024, 1:22 PM
Unknown Object (File)
Oct 16 2024, 4:29 PM
Unknown Object (File)
Oct 3 2024, 8:30 AM
Subscribers

Details

Summary

After eaad8d1303da500ed691bd774742a4555a05e729 four additional
capsicum-test tests started failing. It turns out this is because
fget_only_user() was returning EBADF on a failed capsicum check instead
of forwarding the return value of cap_check_inline() like
fget_unlocked_seq().

Test Plan

capsicum-test failures before this:

[  FAILED  ] 7 tests, listed below:
[  FAILED  ] Capability.OperationsForked
[  FAILED  ] Capability.NoBypassDAC
[  FAILED  ] Pdfork.OtherUserForked
[  FAILED  ] PipePdfork.WildcardWait
[  FAILED  ] OpenatTest.WithFlag
[  FAILED  ] ForkedOpenatTest_WithFlagInCapabilityMode._
[  FAILED  ] Select.LotsOFileDescriptorsForked

After:

[  FAILED  ] 3 tests, listed below:
[  FAILED  ] Capability.NoBypassDAC
[  FAILED  ] Pdfork.OtherUserForked
[  FAILED  ] PipePdfork.WildcardWait

Diff Detail

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