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)
Mon, Oct 27, 6:18 AM
Unknown Object (File)
Mon, Oct 27, 1:58 AM
Unknown Object (File)
Sun, Oct 26, 8:25 PM
Unknown Object (File)
Sun, Oct 26, 8:25 PM
Unknown Object (File)
Sun, Oct 26, 8:25 PM
Unknown Object (File)
Sun, Oct 26, 2:42 PM
Unknown Object (File)
Thu, Oct 23, 10:38 PM
Unknown Object (File)
Mon, Oct 13, 3:13 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.