From e8fa03d42a2a5c63c81064a85b73b25eaa5f4194 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 4 Jul 2016 13:52:54 +0800 Subject: [PATCH] cmake: do not link libglobal with lttng-ust only link tracing libraries with lttng-ust, this fixes selinux denial errors at run-time: SELinux denials found on ubuntu@mira054.front.sepia.ceph.com: ['type=AVC msg=audit(1467543917.770:131781): avc: denied { open } for pid=17511 comm="ceph-mon" path="/dev/shm/lttng-ust-wait-5" dev="tmpfs" ino=75199 scontext=system_u:system_r:ceph_t:s0 tcontext=system_u:object_r:tmpfs_t:s0 tclass=file', 'type=AVC msg=audit(1467543914.518:131756): avc: denied { open } for pid=17418 comm="ceph-osd" path="/dev/shm/lttng-ust-wait-5" dev="tmpfs" ino=75199 scontext=system_u:system_r:ceph_t:s0 tcontext=system_u:object_r:tmpfs_t:s0 tclass=file', 'type=AVC msg=audit(1467543917.770:131781): avc: denied { read } for pid=17511 comm="ceph-mon" name="lttng-ust-wait-5" dev="tmpfs" ino=75199 scontext=system_u:system_r:ceph_t:s0 tcontext=system_u:object_r:tmpfs_t:s0 tclass=file', 'type=AVC msg=audit(1467543914.518:131756): avc: denied { read } for pid=17418 comm="ceph-osd" name="lttng-ust-wait-5" dev="tmpfs" ino=75199 scontext=system_u:system_r:ceph_t:s0 tcontext=system_u:object_r:tmpfs_t:s0 tclass=file'] Signed-off-by: Kefu Chai --- src/CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 09a9753d12667..62034caf481aa 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -523,9 +523,6 @@ add_library(global STATIC ${libglobal_srcs} $) target_link_libraries(global common ${CMAKE_THREAD_LIBS_INIT} ${CRYPTO_LIBS} ${EXTRALIBS}) -if(${WITH_LTTNG}) - target_link_libraries(global lttng-ust dl) -endif(${WITH_LTTNG}) # rados object classes add_subdirectory(cls) -- 2.39.5