=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/usbhidctl/usbhid.c,v retrieving revision 1.17 retrieving revision 1.18 diff -c -r1.17 -r1.18 *** src/usr.bin/usbhidctl/usbhid.c 2021/05/31 18:30:11 1.17 --- src/usr.bin/usbhidctl/usbhid.c 2021/12/15 11:21:35 1.18 *************** *** 1,4 **** ! /* $OpenBSD: usbhid.c,v 1.17 2021/05/31 18:30:11 jcs Exp $ */ /* $NetBSD: usbhid.c,v 1.22 2002/02/20 20:30:42 christos Exp $ */ /* --- 1,4 ---- ! /* $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 $ */ /* *************** *** 940,945 **** --- 940,950 ---- hidfd = open(dev, wflag ? O_RDWR : O_RDONLY); 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;