restrict all filesystem access with unveil(2).
authormestre <mestre@openbsd.org>
Wed, 15 Dec 2021 11:21:35 +0000 (11:21 +0000)
committermestre <mestre@openbsd.org>
Wed, 15 Dec 2021 11:21:35 +0000 (11:21 +0000)
commitb00f338989dc039b32121c9fd6c7d64b6b69bd13
treeb5e1ffbf57e0944df8ed20dbc4a6b434542141ce
parent3a1c83bb3c852787118c9d1ada3fca95cce7b362
restrict all filesystem access with unveil(2).

hid_start(3) opens `table' through libusbhid, then usbhidctl(1) itself opens
`dev', after that it's just performing ioctls on the fd left opened by the
latter so all fs access can be disabled.
usr.bin/usbhidctl/usbhid.c