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, Apr 16, 5:16 PM
Unknown Object (File)
Tue, Apr 16, 5:05 PM
Unknown Object (File)
Tue, Apr 16, 12:05 PM
Unknown Object (File)
Apr 10 2024, 5:47 PM
Unknown Object (File)
Mar 22 2024, 10:33 PM
Unknown Object (File)
Mar 22 2024, 10:33 PM
Unknown Object (File)
Mar 17 2024, 12:58 AM
Unknown Object (File)
Mar 9 2024, 2:49 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.