Page MenuHomeFreeBSD

head(1): Capsicumify
AbandonedPublic

Authored by cem on Sep 18 2016, 1:03 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 10 2024, 7:27 AM
Unknown Object (File)
Dec 26 2023, 2:10 AM
Unknown Object (File)
Dec 22 2023, 10:10 PM
Unknown Object (File)
Nov 30 2023, 6:30 AM
Unknown Object (File)
Nov 9 2023, 5:52 PM
Unknown Object (File)
Nov 7 2023, 12:32 PM
Unknown Object (File)
Nov 4 2023, 8:57 PM
Unknown Object (File)
Oct 30 2023, 8:58 PM
Subscribers

Details

Summary

Capsicumify head(1) by restricting it to a readonly view of the
filesystem. This is both easy to do and impacts performance minimally.

Access to the filesystem could be restricted further, but requires more
elaborate implementation and may suffer from performance trade-off.
This is left as future work.

Test Plan
  • Tested 'head foobar.txt'
  • Tested 'head < foobar.txt'
  • Tested 'head -c10 < foobar.txt'

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 6174
Build 6428: arc lint + arc unit

Event Timeline

cem retitled this revision from to head(1): Capsicumify last input file.
cem updated this object.
cem edited the test plan for this revision. (Show Details)
cem added reviewers: emaste, allanjude, oshogbo.

I think the approach is fine - we'll revisit all of these "capsicumify on last file" cases once a file service is available. Can you update with capsicum_helpers though?

cem edited edge metadata.

Update to use helpers.

Use https://reviews.freebsd.org/D8743 to enter sandbox over all inputs.

It feels like something like 'abspath' should be available in a library for
similarly-sandboxed applications.

cem retitled this revision from head(1): Capsicumify last input file to head(1): Capsicumify.Dec 9 2016, 9:24 PM
cem updated this object.