Loading...
Searching...
No Matches
XrdAccAccess_ID Struct Reference

`#include <XrdAccAccess.hh>`

Collaboration diagram for XrdAccAccess_ID:

## Public Member Functions

| XrdAccAccess_ID (const char *Name=0)
| ~XrdAccAccess_ID ()
bool | Applies (const XrdAccEntityInfo &Entity)
XrdAccAccess_ID * | Export ()

## Public Attributes

XrdAccCapability * | caps
short | glen
char * | grp
short | hlen
char * | host
char * | name
XrdAccAccess_ID * | next
char * | org
char * | role
int | rule
char * | user

## Detailed Description

Definition at line 47 of file XrdAccAccess.hh.

## Constructor & Destructor Documentation

## XrdAccAccess_ID()

XrdAccAccess_ID::XrdAccAccess_ID | ( | const char * | Name = 0 | ) |

inline

Definition at line 71 of file XrdAccAccess.hh.

: name(Name ? strdup(Name) : 0),
grp(0), host(0), org(0), role(0), user(0),
caps(0), next(0), rule(0), hlen(0), glen(0) {}
XrdAccAccess_ID::grp
char * grp
Definition XrdAccAccess.hh:49
XrdAccAccess_ID::user
char * user
Definition XrdAccAccess.hh:53
XrdAccAccess_ID::caps
XrdAccCapability * caps
Definition XrdAccAccess.hh:54
XrdAccAccess_ID::rule
int rule
Definition XrdAccAccess.hh:56
XrdAccAccess_ID::org
char * org
Definition XrdAccAccess.hh:51
XrdAccAccess_ID::hlen
short hlen
Definition XrdAccAccess.hh:57
XrdAccAccess_ID::next
XrdAccAccess_ID * next
Definition XrdAccAccess.hh:55
XrdAccAccess_ID::host
char * host
Definition XrdAccAccess.hh:50
XrdAccAccess_ID::glen
short glen
Definition XrdAccAccess.hh:58
XrdAccAccess_ID::role
char * role
Definition XrdAccAccess.hh:52
XrdAccAccess_ID::name
char * name
Definition XrdAccAccess.hh:48

References caps, glen, grp, hlen, host, name, next, org, role, rule, and user.

Referenced by Export().

Here is the caller graph for this function:

## ~XrdAccAccess_ID()

XrdAccAccess_ID::~XrdAccAccess_ID | ( |  | ) |

inline

Definition at line 75 of file XrdAccAccess.hh.

{if (name) free(name);
if (grp) free(grp);
if (host) free(host);
if (org) free(org);
if (role) free(role);
if (user) free(user);
if (caps) delete caps;
}

References caps, grp, host, name, org, role, and user.

## Member Function Documentation

## Applies()

bool XrdAccAccess_ID::Applies | ( | const XrdAccEntityInfo & | Entity | ) |

Definition at line 446 of file XrdAccAccess.cc.

{
// Check single value items in the most probable use order
//
if (org && (!Entity.vorg || strcmp(org, Entity.vorg))) return false;
if (role && (!Entity.role || strcmp(role, Entity.role))) return false;
if (grp && (!Entity.grup || strcmp(grp, Entity.grup))) return false;
if (user && (!Entity.name || strcmp(user, Entity.name))) return false;
// The check is more complicated as the host field may be a domain.
//
if (host)
{const char *hName;
if (*host == '.')
{int eLen = strlen(Entity.host);
if (eLen <= hlen) return false;
hName = Entity.host + eLen - hlen;
} else hName = Entity.host;
if (strcmp(host, hName)) return false;
}
// All done, this rules applies!
//
return true;
}
XrdAccEntityInfo::vorg
const char * vorg
Definition XrdAccEntity.hh:44
XrdAccEntityInfo::role
const char * role
Definition XrdAccEntity.hh:45
XrdAccEntityInfo::name
const char * name
Definition XrdAccEntity.hh:42
XrdAccEntityInfo::host
const char * host
Definition XrdAccEntity.hh:43
XrdAccEntityInfo::grup
const char * grup
Definition XrdAccEntity.hh:46

References grp, XrdAccEntityInfo::grup, hlen, host, XrdAccEntityInfo::host, XrdAccEntityInfo::name, org, role, XrdAccEntityInfo::role, user, and XrdAccEntityInfo::vorg.

Referenced by XrdAccAccess::Access().

Here is the caller graph for this function:

## Export()

XrdAccAccess_ID * XrdAccAccess_ID::Export | ( |  | ) |

inline

Definition at line 62 of file XrdAccAccess.hh.

{XrdAccAccess_ID *xID;
xID = new XrdAccAccess_ID;
*xID = *this;
name = grp = host = org = role = user = 0;
caps = 0;
return xID;
}
XrdAccAccess_ID::XrdAccAccess_ID
XrdAccAccess_ID(const char *Name=0)
Definition XrdAccAccess.hh:71

References XrdAccAccess_ID(), caps, grp, host, name, org, role, and user.

Here is the call graph for this function:

## Member Data Documentation

## caps

XrdAccCapability* XrdAccAccess_ID::caps

Definition at line 54 of file XrdAccAccess.hh.

Referenced by XrdAccAccess_ID(), ~XrdAccAccess_ID(), XrdAccAccess::Access(), and Export().

## glen

short XrdAccAccess_ID::glen

Definition at line 58 of file XrdAccAccess.hh.

Referenced by XrdAccAccess_ID().

## grp

char* XrdAccAccess_ID::grp

Definition at line 49 of file XrdAccAccess.hh.

Referenced by XrdAccAccess_ID(), ~XrdAccAccess_ID(), Applies(), and Export().

## hlen

short XrdAccAccess_ID::hlen

Definition at line 57 of file XrdAccAccess.hh.

Referenced by XrdAccAccess_ID(), and Applies().

## host

char* XrdAccAccess_ID::host

Definition at line 50 of file XrdAccAccess.hh.

Referenced by XrdAccAccess_ID(), ~XrdAccAccess_ID(), Applies(), Export(), and XrdAccAccess::SwapTabs().

## name

char* XrdAccAccess_ID::name

Definition at line 48 of file XrdAccAccess.hh.

Referenced by XrdAccAccess_ID(), ~XrdAccAccess_ID(), and Export().

## next

XrdAccAccess_ID* XrdAccAccess_ID::next

Definition at line 55 of file XrdAccAccess.hh.

Referenced by XrdAccAccess_ID(), XrdAccAccess::Access(), and XrdAccAccess::SwapTabs().

## org

char* XrdAccAccess_ID::org

Definition at line 51 of file XrdAccAccess.hh.

Referenced by XrdAccAccess_ID(), ~XrdAccAccess_ID(), Applies(), and Export().

## role

char* XrdAccAccess_ID::role

Definition at line 52 of file XrdAccAccess.hh.

Referenced by XrdAccAccess_ID(), ~XrdAccAccess_ID(), Applies(), and Export().

## rule

int XrdAccAccess_ID::rule

Definition at line 56 of file XrdAccAccess.hh.

Referenced by XrdAccAccess_ID().

## user

char* XrdAccAccess_ID::user

Definition at line 53 of file XrdAccAccess.hh.

Referenced by XrdAccAccess_ID(), ~XrdAccAccess_ID(), Applies(), and Export().

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

- XrdAccAccess.hh
- XrdAccAccess.cc