summaryrefslogtreecommitdiff
path: root/src/daemon/caps.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/caps.c')
-rw-r--r--src/daemon/caps.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/daemon/caps.c b/src/daemon/caps.c
index 2251cb373..68b79cebd 100644
--- a/src/daemon/caps.c
+++ b/src/daemon/caps.c
@@ -80,12 +80,18 @@ void pa_drop_root(void) {
void pa_drop_caps(void) {
#ifdef HAVE_SYS_CAPABILITY_H
+#ifdef __linux
cap_t caps;
pa_assert_se(caps = cap_init());
pa_assert_se(cap_clear(caps) == 0);
pa_assert_se(cap_set_proc(caps) == 0);
pa_assert_se(cap_free(caps) == 0);
+#elif __FreeBSD__
+ pa_assert_se (cap_enter () == 0);
#else
+#error Don't know how to do capabilities on your system. Please send a patch.
+#endif /* __linux */
+#else /* HAVE_SYS_CAPABILITY_H */
pa_log_warn("Normally all extra capabilities would be dropped now, but "
"that's impossible because this Pulseaudio was built without "
"libcap support.");