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)
Tue, Nov 25, 12:14 PM
Unknown Object (File)
Tue, Nov 25, 3:29 AM
Unknown Object (File)
Mon, Nov 24, 4:17 PM
Unknown Object (File)
Sat, Nov 22, 1:04 AM
Unknown Object (File)
Sun, Nov 16, 3:17 AM
Unknown Object (File)
Sat, Nov 15, 5:41 PM
Unknown Object (File)
Tue, Nov 11, 11:51 PM
Unknown Object (File)
Oct 27 2025, 6: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.