Up to [local] / src / usr.bin / mixerctl
Request diff between arbitrary revisions
Default branch: MAIN
Current tag: OPENBSD_6_5
Revision 1.31 / (download) - annotate - [select for diffs], Wed Aug 8 19:35:47 2018 UTC (5 years, 9 months ago) by mestre
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE,
OPENBSD_6_5,
OPENBSD_6_4_BASE,
OPENBSD_6_4
Changes since 1.30: +13 -3 lines
Diff to previous 1.30 (colored)
add unveil(2) to mixerctl(1) after we know what is the mixer device to be used, either through MIXERDEVICE env var, the argument passed or by default /dev/mixer then we can unveil it in read/write mode, then if opening fails we reduce unveil to only read mode. Once open(2) succeeds then we can disable fs access by calling unveil(NULL, NULL) since all further operations occur on fds. A cleaner solution would be to just call pledge("audio") after open(2) but currently the ioctls used are not whitelisted in pledge(2), ratchov@ will investigate a better way to do this OK ratchov@