Page MenuHomeFreeBSD

hexdump(1): First cut capsicumification
ClosedPublic

Authored by cem on Sep 18 2016, 3:11 AM.
Tags
None
Referenced Files
F150204155: D7915.id20559.diff
Mon, Mar 30, 6:11 AM
F150142815: D7915.id.diff
Sun, Mar 29, 6:23 PM
Unknown Object (File)
Sat, Mar 28, 6:29 PM
Unknown Object (File)
Thu, Mar 26, 11:48 AM
Unknown Object (File)
Thu, Mar 26, 9:42 AM
Unknown Object (File)
Wed, Mar 25, 1:25 AM
Unknown Object (File)
Tue, Mar 24, 9:36 AM
Unknown Object (File)
Mon, Mar 23, 4:58 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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #20412)

extra blank line?
also cap_rights_t should probably sort first

usr.bin/hexdump/hexdump.c
44–45 ↗(On Diff #20412)

style(9) as previously noted

100 ↗(On Diff #20412)

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 ↗(On Diff #20412)

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 ↗(On Diff #20412)

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

100 ↗(On Diff #20412)

Sure.

usr.bin/hexdump/display.c
340 ↗(On Diff #20412)

Ah I guess that makes sense.

usr.bin/hexdump/hexdump.c
44–45 ↗(On Diff #20412)

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.