opensciencegrid / xrootd-multiuser

A filesystem plugin to allow Xrootd write as a different Unix user
Apache License 2.0
2 stars 12 forks source link

Refactor how username is determined to match new behavior in xrootd 5.1 #17

Closed djw8605 closed 3 years ago

djw8605 commented 3 years ago

XRootD SciTokens change behavior in https://github.com/xrootd/xrootd/pull/1382

matyasselmeci commented 3 years ago

Bad news:

[100%] Building CXX object CMakeFiles/XrdMultiuser.dir/src/multiuser.cpp.o
/usr/bin/c++   -DXrdMultiuser_EXPORTS -D_POSIX_C_SOURCE=200809L -std=gnu++11 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -Wall -Werror -O2 -g -DNDEBUG -fPIC -I/usr/include/xrootd    -o CMakeFiles/XrdMultiuser.dir/src/multiuser.cpp.o -c /builddir/build/BUILD/xrootd-multiuser-0.4.5/src/multiuser.cpp
/builddir/build/BUILD/xrootd-multiuser-0.4.5/src/multiuser.cpp: In constructor 'UserSentry::UserSentry(const XrdSecEntity*, XrdSysError&, XrdAccAuthorize*, const char*, const char*)':
/builddir/build/BUILD/xrootd-multiuser-0.4.5/src/multiuser.cpp:155:72: error: no matching function for call to 'XrdSecEntityAttr::Get(const char [15], std::string*)'
         auto got_token = client->eaAPI->Get("scitokens.name", &username);
                                                                        ^
/builddir/build/BUILD/xrootd-multiuser-0.4.5/src/multiuser.cpp:155:72: note: candidates are:
In file included from /builddir/build/BUILD/xrootd-multiuser-0.4.5/src/multiuser.cpp:7:0:
/usr/include/xrootd/XrdSec/XrdSecEntityAttr.hh:94:18: note: XrdSecAttr* XrdSecEntityAttr::Get(const void*)
 XrdSecAttr      *Get(const void *sigkey);
                  ^
/usr/include/xrootd/XrdSec/XrdSecEntityAttr.hh:94:18: note:   candidate expects 1 argument, 2 provided
/usr/include/xrootd/XrdSec/XrdSecEntityAttr.hh:106:18: note: bool XrdSecEntityAttr::Get(const string&, std::string&)
          bool    Get(const std::string &key, std::string &val);
                  ^
/usr/include/xrootd/XrdSec/XrdSecEntityAttr.hh:106:18: note:   no known conversion for argument 2 from 'std::string* {aka std::basic_string<char>*}' to 'std::string& {aka std::basic_string<char>&}'
make[2]: *** [CMakeFiles/XrdMultiuser.dir/src/multiuser.cpp.o] Error 1
djw8605 commented 3 years ago

Shoot. should be fixed in 4341fe7cdba8e264407bf58c6faff8bfb8ce5b40

matyasselmeci commented 3 years ago

Yep, compiles just fine if I add that commit too.

matyasselmeci commented 3 years ago

VMU tests succeeded (failures are from the TPC tests).