Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147727214
D50709.1784198832.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
564 B
Referenced Files
None
Subscribers
None
D50709.1784198832.diff
View Options
Index: usr.bin/beep/beep.c
===================================================================
--- usr.bin/beep/beep.c
+++ 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
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 16, 10:47 AM (7 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29154240
Default Alt Text
D50709.1784198832.diff (564 B)
Attached To
Mode
D50709: beep: Capsicumize
Attached
Detach File
Event Timeline
Log In to Comment