From: Kefu Chai Date: Mon, 4 Jul 2016 05:52:54 +0000 (+0800) Subject: cmake: do not link libglobal with lttng-ust X-Git-Tag: ses5-milestone5~503^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e8fa03d42a2a5c63c81064a85b73b25eaa5f4194;p=ceph.git 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 --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 09a9753d1266..62034caf481a 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)