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 <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2016-07-04 13:52:54 +08:00
parent 0c5fb822dd
commit e8fa03d42a

View File

@ -523,9 +523,6 @@ add_library(global STATIC ${libglobal_srcs}
$<TARGET_OBJECTS:global_common_objs>)
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)