Page MenuHomeFreeBSD

D50709.id.diff
No OneTemporary

D50709.id.diff

diff --git a/usr.bin/beep/beep.c b/usr.bin/beep/beep.c
--- a/usr.bin/beep/beep.c
+++ b/usr.bin/beep/beep.c
@@ -25,6 +25,7 @@
#include <sys/soundcard.h>
+#include <capsicum_helpers.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
@@ -204,6 +205,9 @@
if (f < 0)
err(1, "Failed to open '%s'", oss_dev);
+ if (caph_enter() == -1)
+ err(1, "Failed to enter capability mode");
+
c = 1; /* mono */
if (ioctl(f, SOUND_PCM_WRITE_CHANNELS, &c) != 0)
errx(1, "ioctl SOUND_PCM_WRITE_CHANNELS(1) failed");

File Metadata

Mime Type
text/plain
Expires
Fri, May 15, 12:27 PM (3 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33047426
Default Alt Text
D50709.id.diff (529 B)

Event Timeline