From 931db8f8ff129eba92b7b6176fa3767ff29eef1d Mon Sep 17 00:00:00 2001 From: Brian Bockelman Date: Sat, 18 Feb 2023 12:12:08 -0600 Subject: [PATCH] Override error message for EAUTH On Linux platforms, the "authentication denied" error is mapped to the EBADE errno (as EAUTH doesn't exist). That results in authentication errors in XrdPss to generate the "invalid exchange" error message (this is because XrdPss takes the errno from XrdPosix and XrdPosix returns EBADE/EAUTH). Rather than start tinkering with alternate errno's for this case, simply map EBADE's error message to "authentication denied". --- src/XrdSys/XrdSysE2T.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/XrdSys/XrdSysE2T.cc b/src/XrdSys/XrdSysE2T.cc index f1f922262c6..9cb3621baa6 100644 --- a/src/XrdSys/XrdSysE2T.cc +++ b/src/XrdSys/XrdSysE2T.cc @@ -63,6 +63,12 @@ int initErrTable() lastGood = i; } } + // NOTE: On systems without EAUTH (authentication error; currently all Glibc systems but GNU Hurd), + // EAUTH is remapped to EBADE ('invalid exchange'). Given there's no current XRootD use of a + // syscall that can return EBADE, we assume EBADE really means authentication denied. +#if defined(EBADE) + Errno2String[EBADE] = "authentication failed - possible invalid exchange"; +#endif // Supply generic message for missing ones //