Skip to content

Commit

Permalink
Merge branch 'master' into xrdssiV2
Browse files Browse the repository at this point in the history
  • Loading branch information
abh3 committed Mar 23, 2017
2 parents 3346eb4 + d29f074 commit c3ea084
Show file tree
Hide file tree
Showing 63 changed files with 1,520 additions and 1,076 deletions.
3 changes: 3 additions & 0 deletions cmake/FindOpenSSL.cmake
Expand Up @@ -46,6 +46,9 @@ endif()

set ( CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARIES} )

check_function_exists(TLS_method HAVE_TLS)
compiler_define_if_found(HAVE_TLS HAVE_TLS)

check_function_exists(TLSv1_2_method HAVE_TLS12)
compiler_define_if_found(HAVE_TLS12 HAVE_TLS12)

Expand Down
25 changes: 16 additions & 9 deletions docs/PreReleaseNotes.txt
Expand Up @@ -5,17 +5,24 @@ XRootD
Prerelease Notes
================

+ **New Features**
* **[XrdCms] Add non-blocking sends to avoid slow links.

+ **Major bug fixes**
* **[XrdCeph] Account for return Ceph xattr return codes.
* **[XrdCrypto]** Improved determination of X509 certificate type, including proxy version
**[XrdHttp]** Fix memory leak in Bridge protocol (affects HTTP).
**[XrdSecgsi]** Several improvements in the way CRLs are checked and reloaded.
* **[XrdCrypto/XrdSecgsi]** Make sure the CRL is loaded for the right CA.
* **[XrdCrypto]** Support for OpenSSL 1.1
* **[XrdSecgsi]** Improve detection of errors when loading CRL.
* **[XrdSecgsi]** Fix for valid legacy proxy detection (PR #469)
* **[XrdSecgsi]** Absent CRLs not an error (#465)
* **[XrdSecgsi]** Fix for CA chain verification segfault (issue #463)
* **[XrdCl]** Make sure there is no request/response mismatch, when
the retry logics tries to recover from an error.
* **[XrdCl/Server]** Be case insensitive when it comes to checksum names.

+ **Minor bug fixes**
* **[XrdHttp]** Make the XrdHttpSecXtractor API backwards compatible.
* **[XrdFileCache]** Make caching proxy configuration backwards
compatible.
* **[XrdSec]** Use CommonCrypto header instead of openssl for SHA on OSX.

+ **Miscellaneous**
* **[XrdSecgsi]** Re-activate xrdgsitest
* **[RPM]** Include xrdgsitest in xrootd-client-devel package.
* **[XrdPosix]** Add new minpages option to pss.cache to support large pages.
* **{XrdApps]** Remove XrdClient dependency from xrdadler32.
* **[Server]** Add XrdCksAssist functions to help handle XRootD checksums.
33 changes: 33 additions & 0 deletions docs/ReleaseNotes.txt
Expand Up @@ -6,6 +6,39 @@ Release Notes
=============


-------------
Version 4.6.0
-------------

+ **New Features**
* **[XrdCms]** Add non-blocking sends to avoid slow links.
* **[XrdFileCache]** File caching proxy V2 (and new pss async interface).

+ **Major bug fixes**
* **[XrdCeph]** Account for return Ceph xattr return codes.
* **[XrdCeph]** Fixed initialization of Ceph clusters when stripers are not used.
* **[XrdCrypto]** Improved determination of X509 certificate type,
including proxy version
* **[XrdHttp]** Fix memory leak in Bridge protocol (affects HTTP).
* **[XrdSecgsi]** Several improvements in the way CRLs are checked and reloaded.
* **[XrdCl]** Protect against spurious wakeups in SyncResponseHandler.
* **[XrdCl]** On read-timeout, if the stream is broken, make sure the request and
its handler are not double deleted.

+ **Minor bug fixes**
* **[XrdCl]** Check if the file was correctly closed upon ZipArchiveReader destruction.
* **[Server]** Add limits for prepare requests.
* **[Server]** Delete buffers when the buffer manager is deleted. Fixes #414
* **[Server]** Do not double count overlapping spaces. Fixes #425
* **[XrdHttp]** Allow unauthenticated https clients.
* **[XrdHttp]** Make Xrdhttp secure by default (rejecting proxy cert in the absence
of a proper SecXtractor plugin)

+ **Miscellaneous**
* **[XrdSecgsi]** Re-activate xrdgsitest
* **[RPM]** Include xrdgsitest in xrootd-client-devel package.
* **[XrdFileCache]** Add example of filecache configuration.

-------------
Version 4.5.0
-------------
Expand Down
12 changes: 1 addition & 11 deletions packaging/rhel/xrootd.spec.in
Expand Up @@ -25,12 +25,6 @@
%define _with_ceph 1
%endif

%if %{?fedora}%{!?fedora:0} >= 26
%define use_compat_openssl 1
%else
%define use_compat_openssl 0
%endif

# Remove default rpm python bytecompiling scripts
%global __os_install_post \
%(echo '%{__os_install_post}' | \
Expand Down Expand Up @@ -69,11 +63,7 @@ BuildRequires: krb5-devel
BuildRequires: zlib-devel
BuildRequires: ncurses-devel
BuildRequires: python-devel
%if %{use_compat_openssl}
BuildRequires: compat-openssl10-devel
%else
BuildRequires: openssl-devel
%endif

BuildRequires: selinux-policy-devel

Expand Down Expand Up @@ -708,6 +698,7 @@ fi
%{_libdir}/libXrdClient.so
%{_libdir}/libXrdFfs.so
%{_libdir}/libXrdPosix.so
%{_mandir}/man1/xrdgsitest.1*

%files server-libs
%defattr(-,root,root,-)
Expand Down Expand Up @@ -754,7 +745,6 @@ fi
%{_mandir}/man1/xrdcp-old.1*
%{_mandir}/man1/xrdfs.1*
%{_mandir}/man1/xrdgsiproxy.1*
%{_mandir}/man1/xrdgsitest.1*
%{_mandir}/man1/xrdstagetool.1*

%files fuse
Expand Down
1 change: 0 additions & 1 deletion src/XrdApps.cmake
Expand Up @@ -17,7 +17,6 @@ add_executable(
target_link_libraries(
xrdadler32
XrdPosix
XrdClient
XrdUtils
pthread
${ZLIB_LIBRARY} )
Expand Down
1 change: 1 addition & 0 deletions src/XrdApps/XrdCpConfig.cc
Expand Up @@ -577,6 +577,7 @@ int XrdCpConfig::defCks(const char *opval)
if (n >= XrdCksData::NameSize)
UMSG("Invalid checksum type, '" <<opval <<"'.");
strncpy(csName, opval, n); csName[n] = 0;
toLower( csName );

// Get a checksum object for this checksum
//
Expand Down
9 changes: 9 additions & 0 deletions src/XrdApps/XrdCpConfig.hh
Expand Up @@ -32,6 +32,8 @@

#include "XrdCks/XrdCksData.hh"

#include <ctype.h>

struct option;
class XrdCks;
class XrdCksCalc;
Expand Down Expand Up @@ -199,6 +201,13 @@ private:
void ProcFile(const char *fname);
void Usage(int rc=0);

static void toLower( char cstr[] )
{
for( int i = 0; cstr[i]; ++i )
cstr[i] = tolower( cstr[i] );
}


const char *PName;
int Opts;
int Argc;
Expand Down
82 changes: 17 additions & 65 deletions src/XrdApps/Xrdadler32.cc
Expand Up @@ -50,11 +50,6 @@

#include "XrdPosix/XrdPosixXrootd.hh"
#include "XrdPosix/XrdPosixXrootdPath.hh"
#include "XrdClient/XrdClientUrlInfo.hh"
#include "XrdClient/XrdClientConst.hh"
#include "XrdClient/XrdClient.hh"
#include "XrdClient/XrdClientEnv.hh"
#include "XrdClient/XrdClientAdmin.hh"
#include "XrdOuc/XrdOucString.hh"

#include "XrdCks/XrdCksXAttr.hh"
Expand Down Expand Up @@ -139,61 +134,27 @@ int fGetXattrAdler32(const char *path, int fd, const char* attr, char *value)
return 8;
}

/* get the actual root url pointing to the data server */
char get_current_url(const char *oldurl, char *newurl)
{
bool stat;
long id, flags, modtime;
long long size;
XrdOucString url(oldurl);

XrdClientAdmin *adm = new XrdClientAdmin(url.c_str());
if (adm->Connect())
{
XrdClientUrlInfo u(url);

stat = adm->Stat((char *)u.File.c_str(), id, size, flags, modtime);
if (stat && adm->GetCurrentUrl().IsValid())
{
strcpy(newurl, adm->GetCurrentUrl().GetUrl().c_str());
delete adm;
return 1;
}
}
delete adm;
return 0;
}

/* the rooturl should point to the data server, not redirector */
char getchksum(const char *rooturl, char *chksum)
{
XrdOucString url(rooturl);
char *sum = 0, *ptb, *pte;
long sumlen;
int pte_ptb;
char csBuff[256];
int csLen;

XrdClientAdmin *adm = new XrdClientAdmin(url.c_str());
if (adm->Connect())
{
XrdClientUrlInfo u(url);
sumlen = adm->GetChecksum((kXR_char *)u.File.c_str(), (kXR_char**) &sum);
pte = ptb = sum;
if (sumlen != 0)
{
ptb = strchr(sum, ' ');
ptb++;
pte = strchr(ptb, ' ');
if (pte == NULL) pte = &sum[sumlen];
}
pte_ptb = pte - ptb;
strncpy(chksum, ptb, pte_ptb);
chksum[pte_ptb] = '\0';
free(sum);
delete adm;
return pte_ptb; /* 0 means sever doesn't implement a checksum */
}
else
return -1;
// Obtain the checksum (this is the default checksum)
//
csLen = XrdPosixXrootd::Getxattr(rooturl, "xroot.cksum",
csBuff, sizeof(csBuff));
if (csLen < 0) return -1;
if (csLen == 0) return 0; // Server doesn't have the checksum

// Verify that the checksum returned is "adler32"
//
if (strncmp("adler32 ", csBuff, 8)) return 0;

// Return the checksum value (this is really bad code)
//
strcpy(chksum, csBuff+8);
return strlen(csBuff+8);
}

#define N 1024*1024 /* reading block size */
Expand Down Expand Up @@ -261,13 +222,6 @@ int main(int argc, char *argv[])
}
else
{ /* this is a Xrootd file */
EnvPutInt(NAME_DEBUG, -1);
if (!get_current_url(path, path))
{
printf("Error_accessing: %s\n", argv[1]);
return 1;
}

if (getchksum(path, chksum) > 0)
{ /* server implements checksum */
printf("%s %s\n", chksum, argv[1]);
Expand All @@ -276,8 +230,6 @@ int main(int argc, char *argv[])
else
{ /* need to read the file and calculate */
XrdPosixXrootd myPFS(-8, 8, 1);
EnvPutInt(NAME_READAHEADSIZE, N);
EnvPutInt(NAME_READCACHESIZE, 2*N);
rc = XrdPosixXrootd::Stat(path, &stbuf);
if (rc != 0 || ! S_ISREG(stbuf.st_mode) ||
(fd = XrdPosixXrootd::Open(path, O_RDONLY, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH)) < 0)
Expand Down

0 comments on commit c3ea084

Please sign in to comment.