Skip to content

Commit

Permalink
Merge branch 'master' into pssasync
Browse files Browse the repository at this point in the history
  • Loading branch information
abh3 committed Jun 13, 2016
2 parents 7963221 + 78089d7 commit 396ee27
Show file tree
Hide file tree
Showing 71 changed files with 2,632 additions and 955 deletions.
16 changes: 16 additions & 0 deletions cmake/FindOpenSSL.cmake
Expand Up @@ -38,3 +38,19 @@ else()

mark_as_advanced( OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES )
endif()


#-------------------------------------------------------------------------------
# Check for the TLS support in the OpenSSL version that is available
#-------------------------------------------------------------------------------

set ( CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES} )

check_function_exists(TLSv1_2_method HAVE_TLS12)
compiler_define_if_found(HAVE_TLS12 HAVE_TLS12)

check_function_exists(TLSv1_1_method HAVE_TLS11)
compiler_define_if_found(HAVE_TLS11 HAVE_TLS11)

check_function_exists(TLSv1_method HAVE_TLS1)
compiler_define_if_found(HAVE_TLS1 HAVE_TLS1)
2 changes: 2 additions & 0 deletions cmake/XRootDSystemCheck.cmake
Expand Up @@ -125,3 +125,5 @@ if ( EnableAtomicsIfPresent )
compiler_define_if_found( HAVE_ATOMICS HAVE_ATOMICS )
endif ()



6 changes: 6 additions & 0 deletions docs/PreReleaseNotes.txt
Expand Up @@ -6,12 +6,18 @@ Prerelease Notes
================

+ **New Features**
* [Server] Add new logging plugin interface.
* [Server] Fixes #345 - add sid to TOD structure (ABI compliant).
* [Server] Implement resource selection affinity (primarily for ssi).

+ **Major bug fixes**
* [Client] Serialize security protocol manager to allow MT loads.
* [Authentication/sss] Fix dynamic id incompatability introduced in 4.0.

+ **Minor bug fixes**
* [Server] Make sure lockfile time is updated in deprecated runmodeold.
* [Server] Fixes #344 - squash path before checking for static redirect.
* [Server] Free Entity before replacing it from the cache (memleak).

+ **Miscellaneous**
* [Apps] Add xrdacctest to the tools set to test access control databases.
7 changes: 1 addition & 6 deletions docs/man/xrdcp.1
Expand Up @@ -12,7 +12,7 @@ xrdcp - copy files
[\fB--recursive\fR] [\fB--retry\fR \fItime\fR] [\fB--server\fR]
[\fB--silent\fR] [\fB--sources\fR \fInum\fR] [\fB--streams\fR \fInum\fR]
[\fB--tpc\fR \fIfirst\fR|\fIonly\fR] [\fB--verbose\fR] [\fB--version\fR]
[\fB--xrate\fR \fIrate\fR] [\fB--metalink\fR]
[\fB--xrate\fR \fIrate\fR]

\fIlegacy options\fR: [\fB-adler\fR] [\fB-DS\fR\fIparm string\fR] [\fB-DI\fR\fIparm number\fR]
[\fB-md5\fR] [\fB-np\fR] [\fB-OD\fR\fIcgi\fR] [\fB-OS\fR\fIcgi\fR] [\fB-x\fR]
Expand Down Expand Up @@ -133,11 +133,6 @@ displays version information and immediately exits.
.RS 5
[NOT YET IMPLEMENTED]

.RE
\fB-M\fR | \fB--metalink\fR
.RS 5
treats source as a metalink.

limits the copy speed to the specified \fIrate\fB. The rate may be qualified
with the letter \fBk\fR, \fBm\fR, or \fBg\fR to indicate kilo, mega, or giga
bytes, respectively. The option only applies when the source or destination is
Expand Down
1 change: 1 addition & 0 deletions packaging/common/cmsd@.service
Expand Up @@ -13,6 +13,7 @@ Type=simple
Restart=on-abort
RestartSec=0
KillMode=control-group
LimitNOFILE=65536

[Install]
RequiredBy=multi-user.target
1 change: 1 addition & 0 deletions packaging/common/frm_purged@.service
Expand Up @@ -13,6 +13,7 @@ Type=simple
Restart=on-abort
RestartSec=0
KillMode=control-group
LimitNOFILE=65536

[Install]
RequiredBy=multi-user.target
1 change: 1 addition & 0 deletions packaging/common/frm_xfrd@.service
Expand Up @@ -13,6 +13,7 @@ Type=simple
Restart=on-abort
RestartSec=0
KillMode=control-group
LimitNOFILE=65536

[Install]
RequiredBy=multi-user.target
1 change: 1 addition & 0 deletions packaging/common/xrootd@.service
Expand Up @@ -13,6 +13,7 @@ Type=simple
Restart=on-abort
RestartSec=0
KillMode=control-group
LimitNOFILE=65536

[Install]
RequiredBy=multi-user.target
11 changes: 8 additions & 3 deletions packaging/rhel/xrootd.functions
Expand Up @@ -139,10 +139,15 @@ function stopDaemon()
{
echo -n "Shutting down xrootd ($1, $5): "
PIDFILE="/var/run/xrootd/$1-$5.pid"
killproc -p $PIDFILE $1
RETVAL=$?
if [ -e $PIDFILE ]; then
killproc -p $PIDFILE $1
RETVAL=$?
echo
return $RETVAL
fi
echo -n "$1-$5 not running"
echo
return $RETVAL
return 0
}

#-------------------------------------------------------------------------------
Expand Down
40 changes: 16 additions & 24 deletions src/Xrd/XrdConfig.cc
Expand Up @@ -60,6 +60,7 @@

#include "XrdOuc/XrdOuca2x.hh"
#include "XrdOuc/XrdOucEnv.hh"
#include "XrdOuc/XrdOucLogging.hh"
#include "XrdOuc/XrdOucSiteName.hh"
#include "XrdOuc/XrdOucStream.hh"
#include "XrdOuc/XrdOucUtils.hh"
Expand Down Expand Up @@ -215,19 +216,20 @@ int XrdConfig::Configure(int argc, char **argv)

int retc, NoGo = 0, clPort = -1, optbg = 0;
const char *temp;
char c, buff[512], *dfltProt, *libProt = 0, *logfn = 0;
char c, buff[512], *dfltProt, *libProt = 0;
uid_t myUid = 0;
gid_t myGid = 0;
extern char *optarg;
extern int optind, opterr;
struct XrdOucLogging::configLogInfo LogInfo;
int pipeFD[2] = {-1, -1};
const char *pidFN = 0;
static const int myMaxc = 80;
char **urArgv, *myArgv[myMaxc], argBuff[myMaxc*3+8];
char *argbP = argBuff, *argbE = argbP+sizeof(argBuff)-4;
char *ifList = 0;
int myArgc = 1, bindArg = 1, urArgc = argc, i;
bool noV6, ipV4 = false, ipV6 = false, pureLFN = false;
int myArgc = 1, urArgc = argc, i;
bool noV6, ipV4 = false, ipV6 = false;

// Obtain the protocol name we will be using
//
Expand Down Expand Up @@ -303,18 +305,12 @@ int XrdConfig::Configure(int argc, char **argv)
Usage(1);
}
break;
case 'k': if (!(bindArg = Log.logger()->ParseKeep(optarg)))
case 'k': if (!(LogInfo.keepV = Log.logger()->ParseKeep(optarg)))
{Log.Emsg("Config","Invalid -k argument -",optarg);
Usage(1);
}
break;
case 'l': if ((pureLFN = *optarg == '=')) optarg++;
if (!*optarg)
{Log.Emsg("Config", "Logfile name not specified.");
Usage(1);
}
if (logfn) free(logfn);
logfn = strdup(optarg);
case 'l': LogInfo.logArg = optarg;
break;
case 'L': if (!*optarg)
{Log.Emsg("Config", "Protocol library path not specified.");
Expand Down Expand Up @@ -343,7 +339,7 @@ int XrdConfig::Configure(int argc, char **argv)
case 'v': cerr <<XrdVSTRING <<endl;
_exit(0);
break;
case 'z': Log.logger()->setHiRes();
case 'z': LogInfo.hiRes = true;
break;

default: if (optopt == '-' && *(argv[optind]+1) == '-')
Expand Down Expand Up @@ -401,25 +397,22 @@ int XrdConfig::Configure(int argc, char **argv)
if (optbg)
{
#ifdef WIN32
XrdOucUtils::Undercover(&Log, !logfn);
XrdOucUtils::Undercover(&Log, !LogInfo.logArg);
#else
if (pipe( pipeFD ) == -1)
{Log.Emsg("Config", errno, "create a pipe"); exit(17);}
XrdOucUtils::Undercover(Log, !logfn, pipeFD);
XrdOucUtils::Undercover(Log, !LogInfo.logArg, pipeFD);
#endif
}

// Bind the log file if we have one
//
if (logfn)
{char *lP;
if (!pureLFN && !(logfn = XrdOucUtils::subLogfn(Log,myInsName,logfn)))
_exit(16);
if (LogInfo.logArg)
{LogInfo.xrdEnv = &theEnv;
LogInfo.iName = myInsName;
LogInfo.cfgFn = ConfigFN;
if (!XrdOucLogging::configLog(Log, LogInfo)) _exit(16);
Log.logger()->AddMsg(XrdBANNER);
if (Log.logger()->Bind(logfn, bindArg)) exit(19);
if ((lP = rindex(logfn,'/'))) {*(lP+1) = '\0'; lP = logfn;}
else lP = (char *)"./";
XrdOucEnv::Export("XRDLOGDIR", lP);
}

// Get the full host name. In theory, we should always get some kind of name.
Expand Down Expand Up @@ -545,12 +538,11 @@ int XrdConfig::Configure(int argc, char **argv)
temp = (NoGo ? " initialization failed." : " initialization completed.");
sprintf(buff, "%s:%d", myInstance, PortTCP);
Log.Say("------ ", buff, temp);
if (logfn)
if (LogInfo.logArg)
{strcat(buff, " running ");
retc = strlen(buff);
XrdSysUtils::FmtUname(buff+retc, sizeof(buff)-retc);
Log.logger()->AddMsg(buff);
free(logfn);
}
return NoGo;
}
Expand Down
12 changes: 12 additions & 0 deletions src/XrdApps.cmake
Expand Up @@ -60,6 +60,18 @@ target_link_libraries(
pthread
${EXTRA_LIBS} )

#-------------------------------------------------------------------------------
# xrdacctest
#-------------------------------------------------------------------------------
add_executable(
xrdacctest
XrdApps/XrdAccTest.cc )

target_link_libraries(
xrdacctest
XrdServer
XrdUtils )

#-------------------------------------------------------------------------------
# xrdmapc
#-------------------------------------------------------------------------------
Expand Down
20 changes: 12 additions & 8 deletions src/XrdAcc/XrdAccTest.cc → src/XrdApps/XrdAccTest.cc
Expand Up @@ -52,6 +52,8 @@
#include <sys/param.h>
#include <sys/socket.h>

#include "XrdVersion.hh"

#include "XrdAcc/XrdAccAuthorize.hh"
#include "XrdAcc/XrdAccConfig.hh"
#include "XrdAcc/XrdAccGroups.hh"
Expand Down Expand Up @@ -106,12 +108,14 @@ int opcnt = sizeof(optab)/sizeof(optab[0]);

int main(int argc, char **argv)
{
extern XrdAccAuthorize *XrdAccDefaultAuthorizeObject(XrdSysLogger *lp,
const char *cfn,
const char *parm);
static XrdVERSIONINFODEF(myVer, XrdAccTest, XrdVNUMBER, XrdVERSION);
extern XrdAccAuthorize *XrdAccDefaultAuthorizeObject(XrdSysLogger *lp,
const char *cfn,
const char *parm,
XrdVersionInfo &myVer);
void Usage(const char *);
char *p2l(XrdAccPrivs priv, char *buff, int blen);
int rc = 0, argnum, DebugON = 0;
int rc = 0, argnum;
char c, *argval[32];
int DoIt(int argnum, int argc, char **argv);
XrdOucStream Command;
Expand All @@ -124,14 +128,13 @@ char *ConfigFN = (char *)"./acc.cf";
{ switch(c)
{
case 'c': ConfigFN = optarg; break;
case 'd': DebugON = 1; break;
default: Usage("Invalid option.");
}
}

// Obtain the authorization object
//
if (!(Authorize = XrdAccDefaultAuthorizeObject(&myLogger, ConfigFN, 0)))
if (!(Authorize = XrdAccDefaultAuthorizeObject(&myLogger, ConfigFN, 0, myVer)))
{cerr << "testaccess: Initialization failed." <<endl;
exit(2);
}
Expand Down Expand Up @@ -259,7 +262,8 @@ char *PrivsConvert(XrdAccPrivCaps &ctab, char *buff, int blen)
/******************************************************************************/

void Usage(const char *msg)
{if (msg) cerr <<"testaccess: " <<msg <<endl;
cerr << "testaccess [-c cfn] [-d] [user host op path [path [. . .]]]" <<endl;
{if (msg) cerr <<"xrdacctest: " <<msg <<endl;
cerr << "Usage: xrdacctest [-c cfn] [<user> <host> {d|i|k|l|n|r|w} "
"<path> [<path> [...]]]" <<endl;
exit(1);
}
23 changes: 6 additions & 17 deletions src/XrdApps/XrdCpConfig.cc
Expand Up @@ -81,7 +81,7 @@ static XrdSysError eDest(&Logger, "");

XrdSysError *XrdCpConfig::Log = &XrdCpConfiguration::eDest;

const char *XrdCpConfig::opLetters = ":C:d:D:fFhHI:NpPrRsS:t:T:vVX:y:Z:M";
const char *XrdCpConfig::opLetters = ":C:d:D:fFhHI:NpPrRsS:t:T:vVX:y:Z";

struct option XrdCpConfig::opVec[] = // For getopt_long()
{
Expand All @@ -108,7 +108,6 @@ struct option XrdCpConfig::opVec[] = // For getopt_long()
{OPT_TYPE "version", 0, 0, XrdCpConfig::OpVersion},
{OPT_TYPE "xrate", 1, 0, XrdCpConfig::OpXrate},
{OPT_TYPE "parallel", 1, 0, XrdCpConfig::OpParallel},
{OPT_TYPE "metalink", 0, 0, XrdCpConfig::OpMetalink},
{0, 0, 0, 0}
};

Expand Down Expand Up @@ -222,8 +221,6 @@ do{while(optind < Argc && Legacy(optind)) {}
break;
case OpForce: OpSpec |= DoForce;
break;
case OpMetalink: OpSpec |= DoMetalink;
break;
case OpHelp: Usage(0);
break;
case OpIfile: if (inFile) free(inFile);
Expand Down Expand Up @@ -289,9 +286,9 @@ do{while(optind < Argc && Legacy(optind)) {}

// Make sure we have the right number of files
//
if (inFile) {if (!parmCnt ) UMSG("Destination not specified.");}
else { if (!parmCnt ) UMSG("No files specified.");
if ( parmCnt == 1 && !( OpSpec & DoMetalink ) ) UMSG("Destination not specified.");
if (inFile) {if (!parmCnt ) UMSG("Destination not specified.");}
else { if (!parmCnt ) UMSG("No files specified.");
if ( parmCnt == 1 ) UMSG("Destination not specified.");
}

// Check for conflicts wit third party copy
Expand Down Expand Up @@ -333,13 +330,6 @@ do{while(optind < Argc && Legacy(optind)) {}
FMSG(strerror(rc) <<" processing " <<dstFile->Path, 2);
}
}
else
{
// Create an empty destination file
//
dstFile = new XrdCpFile();
dstFile->Path = strdup( "" );
}

// Now pick up all the source files from the command line
//
Expand Down Expand Up @@ -859,7 +849,7 @@ void XrdCpConfig::Usage(int rc)
" [--path] [--posc] [--proxy <host>:<port>] [--recursive]\n"
" [--retry <n>] [--server] [--silent] [--sources <n>] [--streams <n>]\n"
" [--tpc {first|only}] [--verbose] [--version] [--xrate <rate>]\n"
" [--parallel <n>] [--metalink]";
" [--parallel <n>]";

static const char *Syntax2= "\n"
"<src>: [[x]root://<host>[:<port>]/]<path> | -";
Expand Down Expand Up @@ -903,8 +893,7 @@ void XrdCpConfig::Usage(int rc)
"-V | --version prints the version number\n"
"-X | --xrate <rate> limits the transfer to the specified rate. You can\n"
" suffix the value with 'k', 'm', or 'g'\n"
" --parallel <n> number of copy jobs to be run simultaneously\n"
"-M | --metalink treats source as a metalink\n\n"
" --parallel <n> number of copy jobs to be run simultaneously\n\n"
"Legacy options: [-adler] [-DI<var> <val>] [-DS<var> <val>] [-np]\n"
" [-md5] [-OD<cgi>] [-OS<cgi>] [-version] [-x]";

Expand Down
3 changes: 0 additions & 3 deletions src/XrdApps/XrdCpConfig.hh
Expand Up @@ -155,9 +155,6 @@ static const int DoParallel = 0x00200000; // --parallel
static const int OpDynaSrc = 'Z';
static const int DoDynaSrc = 0x00400000; // --dynamic-src

static const int OpMetalink = 'M';
static const int DoMetalink = 0x01000000; // -M | --metalink

// Call Config with the parameters passed to main() to fill out this object. If
// the method returns then no errors have been found. Otherwise, it exits.
// The following options may be passed (largely to support legacy stuff):
Expand Down

0 comments on commit 396ee27

Please sign in to comment.