Page MenuHomeFreeBSD

hexdump(1): First cut capsicumification
ClosedPublic

Authored by cem on Sep 18 2016, 3:11 AM.
Tags
None
Referenced Files
F153436676: D7915.diff
Tue, Apr 21, 4:10 AM
F153419684: D7915.id22790.diff
Tue, Apr 21, 1:51 AM
Unknown Object (File)
Sun, Apr 19, 6:53 PM
Unknown Object (File)
Mon, Apr 13, 12:59 AM
Unknown Object (File)
Sat, Apr 11, 10:21 AM
Unknown Object (File)
Sat, Apr 4, 2:42 PM
Unknown Object (File)
Fri, Apr 3, 7:02 PM
Unknown Object (File)
Mon, Mar 30, 6:11 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.