From 79908f45ede1fd25e99f33b41326686722a8a625 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 5 Mar 2026 13:22:01 +0100 Subject: [PATCH] auth/CMakeLists.txt: add cephx/CephxKeyServer.cc to auth_srcs Everybody who includes CephxKeyServer.h must link with CephxKeyServer.cc. Currently, only ceph-mon and ceph-monstore-tool do that. All the others (e.g. ceph_dencoder.cc) get away with that mistake because many of the KeyServer methods are inline, and if they just happen to use only the inline symbols, there is no (visible) problem. However, during my attempts to un-inline some of these methods (to reduce header dependencies and reduce binary bloat due to having many copies of the same code), there were runtime linker failures in "ceph-dencoder". The simplest solution is to just add cephx/CephxKeyServer.cc to auth_srcs. Signed-off-by: Max Kellermann --- src/auth/CMakeLists.txt | 1 + src/mon/CMakeLists.txt | 1 - src/tools/CMakeLists.txt | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/auth/CMakeLists.txt b/src/auth/CMakeLists.txt index 014057f49be..57c0d65a02a 100644 --- a/src/auth/CMakeLists.txt +++ b/src/auth/CMakeLists.txt @@ -8,6 +8,7 @@ set(auth_srcs RotatingKeyRing.cc cephx/CephxAuthorizeHandler.cc cephx/CephxClientHandler.cc + cephx/CephxKeyServer.cc cephx/CephxProtocol.cc cephx/CephxSessionHandler.cc none/AuthNoneAuthorizeHandler.cc) diff --git a/src/mon/CMakeLists.txt b/src/mon/CMakeLists.txt index c5bf64f8c15..34f48e55424 100644 --- a/src/mon/CMakeLists.txt +++ b/src/mon/CMakeLists.txt @@ -1,5 +1,4 @@ set(lib_mon_srcs - ${CMAKE_SOURCE_DIR}/src/auth/cephx/CephxKeyServer.cc ${CMAKE_SOURCE_DIR}/src/auth/cephx/CephxServiceHandler.cc ${CMAKE_SOURCE_DIR}/src/auth/AuthServiceHandler.cc Paxos.cc diff --git a/src/tools/CMakeLists.txt b/src/tools/CMakeLists.txt index ee8ff3f24bc..6700fc244b0 100644 --- a/src/tools/CMakeLists.txt +++ b/src/tools/CMakeLists.txt @@ -48,7 +48,6 @@ endif(WITH_TESTS) add_executable(ceph-monstore-tool ceph_monstore_tool.cc - ../auth/cephx/CephxKeyServer.cc ../mgr/mgr_commands.cc) target_link_libraries(ceph-monstore-tool os global Boost::program_options) install(TARGETS ceph-monstore-tool DESTINATION bin) -- 2.47.3