Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156535799
D50709.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
529 B
Referenced Files
None
Subscribers
None
D50709.id.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D50709: beep: Capsicumize
Attached
Detach File
Event Timeline
Log In to Comment