Page MenuHomeFreeBSD

hexdump(1): First cut capsicumification
ClosedPublic

Authored by cem on Sep 18 2016, 3:11 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 6, 11:52 PM
Unknown Object (File)
Sun, May 3, 6:21 PM
Unknown Object (File)
Fri, May 1, 10:11 AM
Unknown Object (File)
Thu, Apr 30, 7:41 AM
Unknown Object (File)
Tue, Apr 28, 10:06 AM
Unknown Object (File)
Tue, Apr 28, 9:00 AM
Unknown Object (File)
Sat, Apr 25, 8:35 AM
Unknown Object (File)
Thu, Apr 23, 5:38 AM
Subscribers

Details

Summary

For now, only enter the sandbox for the last file processed (including
stdin for zero-argument mode).

Sandboxing all inputs will require a little restructuring of the
program.

Test Plan
  • hexdump (tty input)
  • hexdump -C foo.txt
  • hexdump < foo.txt (stdin)

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 6175
Build 6429: arc lint + arc unit

Event Timeline

cem retitled this revision from to hexdump(1): First cut capsicumification.
cem updated this object.
cem edited the test plan for this revision. (Show Details)
cem added reviewers: emaste, allanjude, oshogbo.
usr.bin/hexdump/display.c
340

extra blank line?
also cap_rights_t should probably sort first

usr.bin/hexdump/hexdump.c
44–45

style(9) as previously noted

95

up to you but I think we can combine all of the cap_*_limit into one if statement and one error

usr.bin/hexdump/display.c
340

I think a blank line separating static variables from the rest makes it more clear that they aren't ordinary stack variables. Same reason to not have rights first.

usr.bin/hexdump/hexdump.c
44–45

Someone should actually add it to style(9) if we're going to keep claiming it's in there.

95

Sure.

usr.bin/hexdump/display.c
340

Ah I guess that makes sense.

usr.bin/hexdump/hexdump.c
44–45

Ok, just "style as previously noted" then :-)

Yes, we need to make this explicit in the man page.

cem marked 2 inline comments as done.
  • Compress cap_*_limits together
  • Put sys/capsicum.h in the right place
This revision was automatically updated to reflect the committed changes.