From 3e13c1fa274b185e34e8caadb87ee2394115e79e Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Wed, 9 Aug 2017 18:15:07 +0000 Subject: [PATCH] capsicum_helpers: Add FIODTYPE to default ioctls allowed FIODTYPE will be needed by hexdump(1) to speed up the -s flag on devices that should be able to support fseek(3); specifically, in an attempt to correct for the fact that most tape drives don't support seeking yet don't indicate as such when fseeko(3) is invoked. Related: D10939 Reviewed by: cem, emaste, oshogbo Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D10937 --- lib/libcapsicum/capsicum_helpers.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libcapsicum/capsicum_helpers.h b/lib/libcapsicum/capsicum_helpers.h index d1a84a98a85..69a32cf8dcb 100644 --- a/lib/libcapsicum/capsicum_helpers.h +++ b/lib/libcapsicum/capsicum_helpers.h @@ -31,6 +31,7 @@ #include #include +#include #include #include @@ -47,7 +48,7 @@ static __inline int caph_limit_stream(int fd, int flags) { cap_rights_t rights; - unsigned long cmds[] = { TIOCGETA, TIOCGWINSZ }; + unsigned long cmds[] = { TIOCGETA, TIOCGWINSZ, FIODTYPE }; cap_rights_init(&rights, CAP_FCNTL, CAP_FSTAT, CAP_IOCTL);