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)
Jan 1 2025, 2:46 AM
Unknown Object (File)
Dec 31 2024, 2:12 AM
Unknown Object (File)
Dec 30 2024, 2:13 AM
Unknown Object (File)
Dec 29 2024, 3:14 AM
Unknown Object (File)
Dec 28 2024, 2:52 AM
Unknown Object (File)
Dec 27 2024, 10:44 PM
Unknown Object (File)
Nov 19 2024, 9:42 AM
Unknown Object (File)
Nov 19 2024, 9:21 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

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

100

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.

100

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.