On Mon, Sep 17, 2018 at 01:27:03PM +0100, Ricardo Mestre wrote:
> 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);

looks fine, thanks.

ok ratchov

Reply via email to