diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/usbhidctl/usbhid.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/usbhidctl/usbhid.c b/usr.bin/usbhidctl/usbhid.c index 25cc61bdf93..1560bb365d4 100644 --- a/usr.bin/usbhidctl/usbhid.c +++ b/usr.bin/usbhidctl/usbhid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usbhid.c,v 1.17 2021/05/31 18:30:11 jcs Exp $ */ +/* $OpenBSD: usbhid.c,v 1.18 2021/12/15 11:21:35 mestre Exp $ */ /* $NetBSD: usbhid.c,v 1.22 2002/02/20 20:30:42 christos Exp $ */ /* @@ -941,6 +941,11 @@ main(int argc, char **argv) if (hidfd == -1) err(1, "%s", dev); + if (unveil("/", "") == -1) + err(1, "unveil /"); + if (unveil(NULL, NULL) == -1) + err(1, "unveil"); + if (ioctl(hidfd, USB_GET_REPORT_ID, &reportid) == -1) reportid = -1; if (verbose > 1) |