capsicum_helpers: Add EVENT to default stdio rights set

Without it, calling caph_limit_stdio(3) breaks Irssi.

Reviewed by:	oshogbo
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D12622
This commit is contained in:
Edward Tomasz Napierala 2017-10-08 17:29:43 +00:00
parent fc09164658
commit 131e8e0289

View File

@ -50,7 +50,8 @@ caph_limit_stream(int fd, int flags)
cap_rights_t rights;
unsigned long cmds[] = { TIOCGETA, TIOCGWINSZ, FIODTYPE };
cap_rights_init(&rights, CAP_FCNTL, CAP_FSTAT, CAP_IOCTL, CAP_SEEK);
cap_rights_init(&rights, CAP_EVENT, CAP_FCNTL, CAP_FSTAT,
CAP_IOCTL, CAP_SEEK);
if ((flags & CAPH_READ) != 0)
cap_rights_set(&rights, CAP_READ);