Loading...
Searching...
No Matches
XrdAccAccess.cc File Reference
`#include <cctype>`
`#include <cstdio>`
`#include <ctime>`
`#include <sys/param.h>`
`#include "XrdVersion.hh"`
`#include "XrdAcc/XrdAccAccess.hh"`
`#include "XrdAcc/XrdAccEntity.hh"`
`#include "XrdAcc/XrdAccCapability.hh"`
`#include "XrdAcc/XrdAccConfig.hh"`
`#include "XrdAcc/XrdAccGroups.hh"`
`#include "XrdNet/XrdNetAddrInfo.hh"`
`#include "XrdOuc/XrdOucUtils.hh"`
`#include "XrdSec/XrdSecEntityAttr.hh"`
`#include "XrdSys/XrdSysPlugin.hh"`
Include dependency graph for XrdAccAccess.cc:

Go to the source code of this file.

## Macros

#define | XrdAccSWAP(x)

## Functions

XrdAccAuthorize * | XrdAccDefaultAuthorizeObject (XrdSysLogger *lp, const char *cfn, const char *parm, XrdVersionInfo &urVer)
unsigned long | XrdOucHashVal2 (const char *KeyVal, int KeyLen)

## Variables

XrdAccConfig | XrdAccConfiguration

## Macro Definition Documentation

## XrdAccSWAP

#define XrdAccSWAP | ( |  | x | ) |

Value:
oldtab.x = Atab.x; Atab.x = newtab.x; \
newtab.x = oldtab.x; oldtab.x = 0;

Definition at line 351 of file XrdAccAccess.cc.

#define XrdAccSWAP(x) oldtab.x = Atab.x; Atab.x = newtab.x; \
newtab.x = oldtab.x; oldtab.x = 0;

Referenced by XrdAccAccess::SwapTabs().

## Function Documentation

## XrdAccDefaultAuthorizeObject()

XrdAccAuthorize * XrdAccDefaultAuthorizeObject | ( | XrdSysLogger * | lp,
|  | const char * | cfn,
|  | const char * | parm,
|  | XrdVersionInfo & | urVer )

Definition at line 64 of file XrdAccAccess.cc.

{
static XrdVERSIONINFODEF(myVer, XrdAcc, XrdVNUMBER, XrdVERSION);
static XrdSysError Eroute(lp, "acc_");
// Verify version compatibility
//
if (urVer.vNum != myVer.vNum && !XrdSysPlugin::VerCmp(urVer,myVer))
return 0;
// Configure the authorization system
//
if (XrdAccConfiguration.Configure(Eroute, cfn)) return (XrdAccAuthorize *)0;
// Set error object pointer
//
XrdAccEntity::setError(&Eroute);
// All is well, return the actual pointer to the object
//
return (XrdAccAuthorize *)XrdAccConfiguration.Authorization;
}
XrdAccConfiguration
XrdAccConfig XrdAccConfiguration
Definition XrdAccConfig.cc:61
XrdVERSIONINFODEF
static XrdVERSIONINFODEF(compiledVer, XrdHttpProtocolTest, XrdVNUMBER, XrdVERSION)
XrdAccAuthorize
Definition XrdAccAuthorize.hh:68
XrdAccEntity::setError
static void setError(XrdSysError *errP)
Definition XrdAccEntity.cc:215
XrdSysError
Definition XrdSysError.hh:90
XrdSysPlugin::VerCmp
static bool VerCmp(XrdVersionInfo &vInf1, XrdVersionInfo &vInf2, bool noMsg=false)
Definition XrdSysPlugin.cc:472

References XrdAccEntity::setError(), XrdSysPlugin::VerCmp(), XrdAccConfiguration, and XrdVERSIONINFODEF().

Referenced by main(), and XrdAccAuthorizeObject().

Here is the call graph for this function:
Here is the caller graph for this function:

## XrdOucHashVal2()

unsigned long XrdOucHashVal2 | ( | const char * | KeyVal,
|  | int | KeyLen )

extern

Definition at line 40 of file XrdOucHashVal.cc.

{ int j;
unsigned long *lp, lword, hval = 0;
int hl = sizeof(hval);
// If name is shorter than the hash length, use the name.
//
if (KeyLen <= hl)
{memcpy(&hval, KeyVal, (size_t)KeyLen);
return hval;
}
// Compute the length of the name and develop starting hash.
//
hval = KeyLen;
j = KeyLen % hl; KeyLen /= hl;
if (j)
{memcpy(&lword, KeyVal, (size_t)hl);
hval ^= lword;
}
lp = (unsigned long *)&KeyVal[j];
// Compute and return the full hash.
//
while(KeyLen--)
{memcpy(&lword, lp++, (size_t)hl);
hval ^= lword;
}
return (hval ? hval : 1);
}

Referenced by XrdAccCapability::XrdAccCapability(), XrdAccAccess::Access(), XrdAccCapability::Privs(), and XrdAccCapability::Privs().

Here is the caller graph for this function:

## Variable Documentation

## XrdAccConfiguration

XrdAccConfig XrdAccConfiguration

extern

Definition at line 61 of file XrdAccConfig.cc.

Referenced by XrdAccAccess::Access(), XrdAccAccess::SwapTabs(), XrdAccConfig_Refresh(), and XrdAccDefaultAuthorizeObject().