xrootd
Main Page
Namespaces
Classes
Files
File List
File Members
src
XrdSec
XrdSecEntity.hh
Go to the documentation of this file.
1
#ifndef __SEC_ENTITY_H__
2
#define __SEC_ENTITY_H__
3
/******************************************************************************/
4
/* */
5
/* X r d S e c E n t i t y . h h */
6
/* */
7
/* (c) 2005 by the Board of Trustees of the Leland Stanford, Jr., University */
8
/* All Rights Reserved. See XrdInfo.cc for complete License Terms */
9
/* Produced by Andrew Hanushevsky for Stanford University under contract */
10
/* DE-AC03-76-SFO0515 with the Department of Energy */
11
/******************************************************************************/
12
13
// This structure is returned during authentication. This is most relevant
14
// for client authentication unless mutual authentication has been implemented
15
// in which case the client can also authenticate the server. It is embeded
16
// in each protocol object to facilitate mutual authentication. Note that the
17
// destructor does nothing and it is the responsibility of the protocol object
18
// to delete the XrdSecEntity data members, if need be. This is because
19
// there can only be one destructor instance for the class and it is ambiguous
20
// as to which shared library definition should be used. Since protocol objects
21
// have unique class names, each one can have a private destructor avoiding
22
// platform specific run-time loader address resolution ecentricities. The OO
23
// "fix" for this problem would require protocols to define a derived private
24
// destructor for this object which is more hassle than it's worth.
25
//
26
#define XrdSecPROTOIDSIZE 8
27
28
class
XrdSecEntity
29
{
30
public
:
31
char
prot
[
XrdSecPROTOIDSIZE
];
// Protocol used
32
char
*
name
;
// Entity's name
33
char
*
host
;
// Entity's host name
34
char
*
vorg
;
// Entity's virtual organization
35
char
*
role
;
// Entity's role
36
char
*
grps
;
// Entity's group names
37
char
*
endorsements
;
// Protocol specific endorsements
38
char
*
creds
;
// Raw client credentials or certificate
39
int
credslen
;
// Length of the 'cert' field
40
char
*
moninfo
;
// Additional information for monitoring
41
char
*
tident
;
// Trace identifier (do not touch)
42
43
XrdSecEntity
(
const
char
*pName =
""
)
44
{strncpy(
prot
, pName,
XrdSecPROTOIDSIZE
-1);
45
prot
[
XrdSecPROTOIDSIZE
-1] =
'\0'
;
46
name
=
host
=
vorg
=
role
=
grps
=
endorsements
=
creds
=
moninfo
=
tident
= 0;
47
credslen
= 0;
48
}
49
~XrdSecEntity
() {}
50
};
51
52
#define XrdSecClientName XrdSecEntity
53
#define XrdSecServerName XrdSecEntity
54
#endif
Generated by
1.8.1.2