XRootD
Loading...
Searching...
No Matches
XrdSsiFileResource Class Reference

#include <XrdSsiFileResource.hh>

Inheritance diagram for XrdSsiFileResource:
Collaboration diagram for XrdSsiFileResource:

Public Member Functions

 XrdSsiFileResource ()
 ~XrdSsiFileResource ()
void Init (const char *path, XrdOucEnv &envP, bool aDNS)
Public Member Functions inherited from XrdSsiResource
 XrdSsiResource (std::string rname, std::string havoid="", std::string ruser="", std::string rinfo="", uint32_t ropts=0, Affinity raff=Default)
 ~XrdSsiResource ()
 Destructor.

Additional Inherited Members

Public Types inherited from XrdSsiResource
enum  Affinity {
  Default ,
  None ,
  Weak ,
  Strong ,
  Strict
}
Public Attributes inherited from XrdSsiResource
Affinity affinity
 Resource affinity.
XrdSsiEntityclient
 -> Pointer to client identification (server-side)
std::string hAvoid
 -> Comma separated list of hosts to avoid
std::string rInfo
 -> Additional information in CGI format
std::string rName
 -> Name of the resource to be used
uint32_t rOpts
 Resource options. One or more of he following:
std::string rUser
 -> Name of the resource user (nil if anonymous)
Static Public Attributes inherited from XrdSsiResource
static const uint32_t Discard = 2
static const uint32_t Reusable = 1

Detailed Description

Definition at line 41 of file XrdSsiFileResource.hh.

Constructor & Destructor Documentation

◆ XrdSsiFileResource()

XrdSsiFileResource::XrdSsiFileResource ( )
inline

Definition at line 47 of file XrdSsiFileResource.hh.

47 : XrdSsiResource(std::string("")), mySec()
48 {}
XrdSsiResource(std::string rname, std::string havoid="", std::string ruser="", std::string rinfo="", uint32_t ropts=0, Affinity raff=Default)

References XrdSsiResource::XrdSsiResource().

Here is the call graph for this function:

◆ ~XrdSsiFileResource()

XrdSsiFileResource::~XrdSsiFileResource ( )
inline

Definition at line 50 of file XrdSsiFileResource.hh.

50{}

Member Function Documentation

◆ Init()

void XrdSsiFileResource::Init ( const char * path,
XrdOucEnv & envP,
bool aDNS )

Definition at line 42 of file XrdSsiFileResource.cc.

43{
44 const XrdSecEntity *entP = envX.secEnv();
45 const char *rVal;
46 int n;
47
48// Construct the security information
49//
50 if (entP)
51 {strncpy(mySec.prot, entP->prot, XrdSsiPROTOIDSIZE);
52 mySec.name = entP->name;
53 mySec.host = (!aDNS ? entP->host : entP->addrInfo->Name(entP->host));
54 mySec.role = entP->vorg;
55 mySec.role = entP->role;
56 mySec.grps = entP->grps;
57 mySec.endorsements = entP->endorsements;
58 mySec.creds = entP->creds;
59 mySec.credslen = entP->credslen;
60 } else mySec.tident = "ssi";
61 client = &mySec;
62
63// Fill out the resource name and user
64//
65 rName = path;
66 if ((rVal = envX.Get("ssi.user"))) rUser = rVal;
67 else rUser.clear();
68
69// Fill out the the optional cgi info
70//
71 if (!(rVal = envX.Get("ssi.cgi"))) rInfo.clear();
72 else {rVal = envX.Env(n);
73 if (!(rVal = strstr(rVal, "ssi.cgi="))) rInfo.clear();
74 else rInfo = rVal+8;
75 }
76}
#define XrdSsiPROTOIDSIZE
const char * Name(const char *eName=0, const char **eText=0)
char * vorg
Entity's virtual organization(s)
int credslen
Length of the 'creds' data.
XrdNetAddrInfo * addrInfo
Entity's connection details.
char prot[XrdSecPROTOIDSIZE]
Auth protocol used (e.g. krb5)
char * creds
Raw entity credentials or cert.
char * grps
Entity's group name(s)
char * name
Entity's name.
char * role
Entity's role(s)
char * endorsements
Protocol specific endorsements.
char * host
Entity's host name dnr dependent.
std::string rUser
-> Name of the resource user (nil if anonymous)
XrdSsiEntity * client
-> Pointer to client identification (server-side)
std::string rInfo
-> Additional information in CGI format
std::string rName
-> Name of the resource to be used

References XrdSecEntity::addrInfo, XrdSsiResource::client, XrdSecEntity::creds, XrdSecEntity::credslen, XrdSecEntity::endorsements, XrdOucEnv::Env(), XrdOucEnv::Get(), XrdSecEntity::grps, XrdSecEntity::host, XrdNetAddrInfo::Name(), XrdSecEntity::name, XrdSecEntity::prot, XrdSsiResource::rInfo, XrdSsiResource::rName, XrdSecEntity::role, XrdSsiResource::rUser, XrdOucEnv::secEnv(), XrdSecEntity::tident, XrdSecEntity::vorg, and XrdSsiPROTOIDSIZE.

Here is the call graph for this function:

The documentation for this class was generated from the following files: