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)
Fri, Jan 24, 5:39 PM
Unknown Object (File)
Wed, Jan 22, 7:08 AM
Unknown Object (File)
Sat, Jan 18, 9:44 PM
Unknown Object (File)
Dec 4 2024, 11:15 PM
Unknown Object (File)
Oct 26 2024, 8:56 AM
Unknown Object (File)
Oct 26 2024, 8:56 AM
Unknown Object (File)
Oct 26 2024, 8:56 AM
Unknown Object (File)
Oct 26 2024, 8:42 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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 9505
Build 9954: arc lint + arc unit

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.