Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherrypick bugfixes from master #1271

Merged
merged 6 commits into from
Aug 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions packaging/rhel/xrootd.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ fi

%preun server
if [ $1 -eq 0 ] ; then
for DAEMON in xrootd cmsd frm_purged frm xfrd; do
for DAEMON in xrootd cmsd frm_purged frm_xfrd; do
for INSTANCE in `/usr/bin/systemctl | grep $DAEMON@ | awk '{print $1;}'`; do
/usr/bin/systemctl --no-reload disable $INSTANCE > /dev/null 2>&1 || :
/usr/bin/systemctl stop $INSTANCE > /dev/null 2>&1 || :
Expand All @@ -657,7 +657,7 @@ fi
%postun server
if [ $1 -ge 1 ] ; then
/usr/bin/systemctl daemon-reload >/dev/null 2>&1 || :
for DAEMON in xrootd cmsd frm_purged frm xfrd; do
for DAEMON in xrootd cmsd frm_purged frm_xfrd; do
for INSTANCE in `/usr/bin/systemctl | grep $DAEMON@ | awk '{print $1;}'`; do
/usr/bin/systemctl try-restart $INSTANCE >/dev/null 2>&1 || :
done
Expand Down
4 changes: 3 additions & 1 deletion src/XrdOuc/XrdOucUtils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,9 @@ void XrdOucUtils::Sanitize(char *str, char subc)
//
if (*str)
{if (*str == '-') *str = subc;
str++;
else if (*str == ' ') *str = subc;
char *blank = rindex(str, ' ');
if (blank) while(*blank == ' ') *blank-- = 0;
while(*str)
{if (!isalnum(*str) && index("_-.", *str) == 0) *str = subc;
str++;
Expand Down
1 change: 1 addition & 0 deletions src/XrdTpc/XrdTpcState.hh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
class XrdSfsFile;
class XrdHttpExtReq;
typedef void CURL;
struct curl_slist;

namespace TPC {
class Stream;
Expand Down
2 changes: 1 addition & 1 deletion src/XrdXrootd/XrdXrootdConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,7 @@ int XrdXrootdProtocol::xmon(XrdOucStream &Config)
//
#if !defined(__solaris__) || !defined(_IEEE_754)
if (monFSopt & XROOTD_MON_FSSSQ && !(std::numeric_limits<double>::is_iec559))
{monFSopt &= !XROOTD_MON_FSSSQ;
{monFSopt &= ~XROOTD_MON_FSSSQ;
eDest.Emsg("Config","Warning, 'fstat ssq' ignored; platform does not "
"use IEEE754 floating point.");
}
Expand Down
6 changes: 2 additions & 4 deletions src/XrdXrootd/XrdXrootdTransit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ void XrdXrootdTransit::Init(XrdXrootd::Bridge::Result *respP, // Private
XrdNetAddrInfo *addrP;
const char *who;
char uname[sizeof(Request.login.username)+1];
int pID, n;
int pID;

// Set standard stuff
//
Expand Down Expand Up @@ -264,10 +264,8 @@ void XrdXrootdTransit::Init(XrdXrootd::Bridge::Result *respP, // Private
// Develop a trace identifier
//
myMutex.Lock(); pID = ++bID; myMutex.UnLock();
n = strlen(nameP);
if (n >= int(sizeof(uname))) n = sizeof(uname)-1;
strncpy(uname, nameP, sizeof(uname)-1);
uname[n] = 0;
uname[sizeof(uname)-1] = 0;
XrdOucUtils::Sanitize(uname);
linkP->setID(uname, pID);

Expand Down
2 changes: 1 addition & 1 deletion src/XrdXrootd/XrdXrootdXeq.cc
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ int XrdXrootdProtocol::do_Login()
// Unmarshall the pid and construct username using the POSIX.1-2008 standard
//
pid = (int)ntohl(Request.login.pid);
strncpy(uname, (const char *)Request.login.username, sizeof(uname)-2);
strncpy(uname, (const char *)Request.login.username, sizeof(uname)-1);
uname[sizeof(uname)-1] = 0;
XrdOucUtils::Sanitize(uname);

Expand Down
2 changes: 1 addition & 1 deletion utils/xrootd-config
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Generic options

Compilation support options
--cflags print pre-processor and compiler flags
--plugin-vesion print plug-in version suffix
--plugin-version print plug-in version suffix

Install directories XRootD was configured to
--prefix
Expand Down