=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/audioctl/audioctl.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- src/usr.bin/audioctl/audioctl.c 2019/06/28 13:35:00 1.37 +++ src/usr.bin/audioctl/audioctl.c 2020/01/30 05:17:07 1.38 @@ -1,4 +1,4 @@ -/* $OpenBSD: audioctl.c,v 1.37 2019/06/28 13:35:00 deraadt Exp $ */ +/* $OpenBSD: audioctl.c,v 1.38 2020/01/30 05:17:07 ratchov Exp $ */ /* * Copyright (c) 2016 Alexandre Ratchov * @@ -217,12 +217,12 @@ argc -= optind; argv += optind; - if (unveil(path, "rw") == -1) + if (unveil(path, "w") == -1) err(1, "unveil"); if (unveil(NULL, NULL) == -1) err(1, "unveil"); - fd = open(path, O_RDWR); + fd = open(path, O_WRONLY); if (fd == -1) err(1, "%s", path); if (ioctl(fd, AUDIO_GETSTATUS, &rstatus) == -1)