Page MenuHomeFreeBSD

capsicum_helpers: Add FIODTYPE to default ioctls allowed
ClosedPublic

Authored by kevans on May 26 2017, 3:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 10, 4:00 PM
Unknown Object (File)
Fri, May 1, 12:54 AM
Unknown Object (File)
Wed, Apr 29, 10:44 PM
Unknown Object (File)
Tue, Apr 28, 3:36 PM
Unknown Object (File)
Tue, Apr 28, 2:06 AM
Unknown Object (File)
Apr 16 2026, 6:08 PM
Unknown Object (File)
Apr 16 2026, 7:03 AM
Unknown Object (File)
Apr 15 2026, 8:18 AM
Subscribers
None

Details

Summary

hexdump(1) will soon use FIODTYPE to determine if it's reading a tape drive,
and it seems to be a harmless enough addition.

Diff Detail

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

Event Timeline

Wait, why does hexdump need to know if it's reading from a tape device?

In D10937#226483, @cem wrote:

Wait, why does hexdump need to know if it's reading from a tape device?

See: D10939 (just created) -- I've no idea if it's still the case, but arundel@ suggested (in 2011, mind) that most tape devices don't support seeking yet fseek succeeds, so it checks this to workaround that behavior and properly seek through a tape device. I don't know enough about tape devices to tell if this is still the case, but hexdump doesn't fail miserably with tape devices post-D10939, it just treats them as regular files.

Sorry, careless wording -- not treated as a regular file, but as a non-fseekable one. =)

Seems harmless to allow in the sandbox.

This revision is now accepted and ready to land.Jun 17 2017, 6:44 AM
This revision was automatically updated to reflect the committed changes.