Hi,

of course it needs that, sorry. ok now?

a little bit more of info here, 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 in this case `hidfd'.

Index: usbhid.c
===================================================================
RCS file: /cvs/src/usr.bin/usbhidctl/usbhid.c,v
retrieving revision 1.17
diff -u -p -u -r1.17 usbhid.c
--- usbhid.c    31 May 2021 18:30:11 -0000      1.17
+++ usbhid.c    13 Dec 2021 15:06:26 -0000
@@ -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)


> 
> You need this, too, no?
> 
>       if (unveil(NULL, NULL) == -1)
>               err(1, "unveil");
> 
> >     if (ioctl(hidfd, USB_GET_REPORT_ID, &reportid) == -1)
> >             reportid = -1;
> >     if (verbose > 1)
> >
> 
> -- 
> I'm not entirely sure you are real.
> 

Reply via email to