[pulseaudio-commits] src/daemon

Peter Meerwald pmeerw at kemper.freedesktop.org
Tue Sep 2 10:46:06 PDT 2014


 src/daemon/caps.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit c6bc835e4572e682c8f09ddc5852ed63da1838d4
Author: Peter Meerwald <pmeerw at pmeerw.net>
Date:   Mon Sep 1 22:53:29 2014 +0200

    daemon: Debian/kFreeBSD 9.2 fails to compile due to caps
    
    Debian/kFreeBSD 9.2 comes with sys/capability.h but it is not usable; work around it
    
    the patch does several things:
    * it makes the comment point to the correct bugtracker issue: https://bugs.freedesktop.org/show_bug.cgi?id=72580
    * it handles Debian/kFreeBSD the same way as FreeBSD
    * it logs a warning that capabilities are actually NOT dropped
    
    daemon/caps.c: In function ‘pa_drop_caps’:
    daemon/caps.c:93:2: error: #error "Don't know how to do capabilities on your system.  Please send a patch."
     #error "Don't know how to do capabilities on your system.  Please send a patch."
      ^
    Makefile:9575: recipe for target 'daemon/pulseaudio-caps.o' failed
    
    Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>

diff --git a/src/daemon/caps.c b/src/daemon/caps.c
index 91c7f95..9471d3b 100644
--- a/src/daemon/caps.c
+++ b/src/daemon/caps.c
@@ -86,9 +86,10 @@ void pa_drop_caps(void) {
     pa_assert_se(cap_clear(caps) == 0);
     pa_assert_se(cap_set_proc(caps) == 0);
     pa_assert_se(cap_free(caps) == 0);
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
     /* FreeBSD doesn't have this functionality, even though sys/capability.h is
-     * available. See https://bugs.freedesktop.org/show_bug.cgi?id=73967 */
+     * available. See https://bugs.freedesktop.org/show_bug.cgi?id=72580 */
+    pa_log_warn("FreeBSD cannot drop extra capabilities, implementation needed.");
 #else
 #error "Don't know how to do capabilities on your system.  Please send a patch."
 #endif /* __linux__ */



More information about the pulseaudio-commits mailing list