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
/* Produced by Andrew Hanushevsky for Stanford University under contract */
9
/* DE-AC02-76-SFO0515 with the Department of Energy */
10
/* */
11
/* This file is part of the XRootD software suite. */
12
/* */
13
/* XRootD is free software: you can redistribute it and/or modify it under */
14
/* the terms of the GNU Lesser General Public License as published by the */
15
/* Free Software Foundation, either version 3 of the License, or (at your */
16
/* option) any later version. */
17
/* */
18
/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
19
/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
20
/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
21
/* License for more details. */
22
/* */
23
/* You should have received a copy of the GNU Lesser General Public License */
24
/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
25
/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
26
/* */
27
/* The copyright holder's institutional names and contributor's names may not */
28
/* be used to endorse or promote products derived from this software without */
29
/* specific prior written permission of the institution or contributor. */
30
/******************************************************************************/
31
32
// This structure is returned during authentication. This is most relevant
33
// for client authentication unless mutual authentication has been implemented
34
// in which case the client can also authenticate the server. It is embeded
35
// in each protocol object to facilitate mutual authentication. Note that the
36
// destructor does nothing and it is the responsibility of the protocol object
37
// to delete the XrdSecEntity data members, if need be. This is because
38
// there can only be one destructor instance for the class and it is ambiguous
39
// as to which shared library definition should be used. Since protocol objects
40
// have unique class names, each one can have a private destructor avoiding
41
// platform specific run-time loader address resolution ecentricities. The OO
42
// "fix" for this problem would require protocols to define a derived private
43
// destructor for this object which is more hassle than it's worth.
44
//
45
46
#include <string.h>
47
48
#define XrdSecPROTOIDSIZE 8
49
50
class
XrdSecEntity
51
{
52
public
:
53
char
prot
[
XrdSecPROTOIDSIZE
];
// Protocol used
54
char
*
name
;
// Entity's name
55
char
*
host
;
// Entity's host name
56
char
*
vorg
;
// Entity's virtual organization
57
char
*
role
;
// Entity's role
58
char
*
grps
;
// Entity's group names
59
char
*
endorsements
;
// Protocol specific endorsements
60
char
*
creds
;
// Raw client credentials or certificate
61
int
credslen
;
// Length of the 'cert' field
62
char
*
moninfo
;
// Additional information for monitoring
63
char
*
tident
;
// Trace identifier (do not touch)
64
65
XrdSecEntity
(
const
char
*pName =
""
)
66
{strncpy(
prot
, pName,
XrdSecPROTOIDSIZE
-1);
67
prot
[
XrdSecPROTOIDSIZE
-1] =
'\0'
;
68
name
=
host
=
vorg
=
role
=
grps
=
endorsements
=
creds
=
moninfo
=
tident
= 0;
69
credslen
= 0;
70
}
71
~XrdSecEntity
() {}
72
};
73
74
#define XrdSecClientName XrdSecEntity
75
#define XrdSecServerName XrdSecEntity
76
#endif
Generated by
1.8.3.1