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)
Thu, Jul 4, 6:27 AM
Unknown Object (File)
Wed, Jul 3, 10:33 AM
Unknown Object (File)
Wed, Jul 3, 3:20 AM
Unknown Object (File)
Sun, Jun 23, 1:59 AM
Unknown Object (File)
Sat, Jun 22, 11:51 PM
Unknown Object (File)
Jun 5 2024, 12:46 AM
Unknown Object (File)
May 30 2024, 1:33 PM
Unknown Object (File)
Apr 26 2024, 6:47 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.