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? 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:16:03 -0000 @@ -217,6 +217,9 @@ main(int argc, char **argv) argc -= optind; argv += optind; + if (unveil(path, "rw") == -1) + err(1, "unveil"); + fd = open(path, O_RDWR); if (fd < 0) err(1, "%s", path);