And of course I missed disabling unveil(2) just right the first call...

Index: audioctl.c
===================================================================
RCS file: /cvs/src/usr.bin/audioctl/audioctl.c,v
retrieving revision 1.35
diff -u -p -u -r1.35 audioctl.c
--- audioctl.c  31 May 2017 04:18:58 -0000      1.35
+++ audioctl.c  17 Sep 2018 12:26:30 -0000
@@ -217,6 +217,11 @@ main(int argc, char **argv)
        argc -= optind;
        argv += optind;
 
+       if (unveil(path, "rw") == -1)
+               err(1, "unveil");
+       if (unveil(NULL, NULL) == -1)
+               err(1, "unveil");
+
        fd = open(path, O_RDWR);
        if (fd < 0)
                err(1, "%s", path);

On 13:22 Mon 17 Sep     , Ricardo Mestre wrote:
> Hi,
> 
> This adds unveil(2) to audioctl(1) which only needs rw to the access control
> device, which by default is /dev/audioctl0, but can be manipulated via args.
> 
> OK?
> 

Reply via email to