Skip to content

Commit 271b4bb

Browse files
committed
AUTH: Add extra debug messages for the AUTH OFS plugin loading and make
sure the newly built OFS library follows the XRootD conventions when it comes to numbering otherwise the XrdSysPlugin will not be able to dlopen and load the necessary symbols for it.
1 parent de873ee commit 271b4bb

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

auth_plugin/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -98,19 +98,19 @@ set_target_properties(EosAuthProto-Objects
9898
#-------------------------------------------------------------------------------
9999
# EosAuthOfs library
100100
#-------------------------------------------------------------------------------
101-
add_library(EosAuthOfs MODULE
101+
add_library(EosAuthOfs-${XRDPLUGIN_SOVERSION} MODULE
102102
EosAuthOfs.cc EosAuthOfs.hh
103103
EosAuthOfsFile.cc EosAuthOfsFile.hh
104104
EosAuthOfsDirectory.cc EosAuthOfsDirectory.hh)
105105

106106
target_link_libraries(
107-
EosAuthOfs PRIVATE
107+
EosAuthOfs-${XRDPLUGIN_SOVERSION} PRIVATE
108108
EosAuthProto-Objects
109109
EosCommon
110110
ZMQ::ZMQ
111111
XROOTD::PRIVATE)
112112

113-
install(TARGETS EosAuthOfs
113+
install(TARGETS EosAuthOfs-${XRDPLUGIN_SOVERSION}
114114
LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}
115115
RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
116116
ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})

auth_plugin/EosAuthOfs.cc

+10-6
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#include <google/protobuf/io/zero_copy_stream_impl.h>
4545

4646
// The global OFS handle
47-
eos::auth::EosAuthOfs* eos::auth::gOFS;
47+
eos::auth::EosAuthOfs* eos::auth::gOFS = nullptr;
4848

4949
extern XrdSysError OfsEroute;
5050
extern XrdOfs* XrdOfsFS;
@@ -69,10 +69,11 @@ extern "C"
6969
//!
7070
//! @returns configures and returns our MgmOfs object
7171
//------------------------------------------------------------------------------
72-
XrdSfsFileSystem* XrdSfsGetFileSystem2(XrdSfsFileSystem* native_fs,
73-
XrdSysLogger* lp,
74-
const char* configfn,
75-
XrdOucEnv* envP)
72+
XrdSfsFileSystem*
73+
XrdSfsGetFileSystem2(XrdSfsFileSystem* native_fs,
74+
XrdSysLogger* lp,
75+
const char* configfn,
76+
XrdOucEnv* envP)
7677
{
7778
if (eos::auth::gOFS) {
7879
// File system object already initialized
@@ -113,12 +114,15 @@ extern "C"
113114
{
114115
if (eos::auth::gOFS) {
115116
// File system object already initialized
117+
OfsEroute.SetPrefix("AuthOfs_");
118+
OfsEroute.logger(lp);
119+
OfsEroute.Say("info=\"return already loaded AUTH OFS pointer\"");
116120
return eos::auth::gOFS;
117121
}
118122

119123
return XrdSfsGetFileSystem2(native_fs, lp, configfn, nullptr);
120124
}
121-
}
125+
} // extern "C"
122126

123127
EOSAUTHNAMESPACE_BEGIN
124128

0 commit comments

Comments
 (0)