XRootD
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)
 

Discard cached resource if it exists

More...
 
 ~XrdSsiResource ()
 Destructor. More...
 

Additional Inherited Members

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

Resource context may be cached and reused

More...
 
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)
Discard cached resource if it exists

◆ ~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
Definition: XrdSsiEntity.hh:41
const char * Name(const char *eName=0, const char **eText=0)
char * vorg
Entity's virtual organization(s)
Definition: XrdSecEntity.hh:71
int credslen
Length of the 'creds' data.
Definition: XrdSecEntity.hh:78
XrdNetAddrInfo * addrInfo
Entity's connection details.
Definition: XrdSecEntity.hh:80
char prot[XrdSecPROTOIDSIZE]
Auth protocol used (e.g. krb5)
Definition: XrdSecEntity.hh:67
char * creds
Raw entity credentials or cert.
Definition: XrdSecEntity.hh:77
char * grps
Entity's group name(s)
Definition: XrdSecEntity.hh:73
char * name
Entity's name.
Definition: XrdSecEntity.hh:69
char * role
Entity's role(s)
Definition: XrdSecEntity.hh:72
char * endorsements
Protocol specific endorsements.
Definition: XrdSecEntity.hh:75
char * host
Entity's host name dnr dependent.
Definition: XrdSecEntity.hh:70
const char * creds
Raw client credentials or cert.
Definition: XrdSsiEntity.hh:53
const char * host
Entity's host name or address.
Definition: XrdSsiEntity.hh:48
const char * tident
Trace identifier always preset.
Definition: XrdSsiEntity.hh:56
const char * name
Entity's name.
Definition: XrdSsiEntity.hh:47
const char * role
Entity's role.
Definition: XrdSsiEntity.hh:50
char prot[XrdSsiPROTOIDSIZE]
Protocol used.
Definition: XrdSsiEntity.hh:46
int credslen
Length of the 'creds' field.
Definition: XrdSsiEntity.hh:54
const char * endorsements
Protocol specific endorsements.
Definition: XrdSsiEntity.hh:52
const char * grps
Entity's group names.
Definition: XrdSsiEntity.hh:51
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, XrdSsiEntity::creds, XrdSecEntity::credslen, XrdSsiEntity::credslen, XrdSecEntity::endorsements, XrdSsiEntity::endorsements, XrdOucEnv::Env(), XrdOucEnv::Get(), XrdSecEntity::grps, XrdSsiEntity::grps, XrdSecEntity::host, XrdSsiEntity::host, XrdNetAddrInfo::Name(), XrdSecEntity::name, XrdSsiEntity::name, XrdSecEntity::prot, XrdSsiEntity::prot, XrdSsiResource::rInfo, XrdSsiResource::rName, XrdSecEntity::role, XrdSsiEntity::role, XrdSsiResource::rUser, XrdOucEnv::secEnv(), XrdSsiEntity::tident, XrdSecEntity::vorg, and XrdSsiPROTOIDSIZE.

+ Here is the call graph for this function:

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