Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137322635
D50709.id157206.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
564 B
Referenced Files
None
Subscribers
None
D50709.id157206.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
Sun, Nov 23, 11:20 AM (3 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26012385
Default Alt Text
D50709.id157206.diff (564 B)
Attached To
Mode
D50709: beep: Capsicumize
Attached
Detach File
Event Timeline
Log In to Comment