XRootD
XrdOucGMap.hh
Go to the documentation of this file.
1 #ifndef __XRDOUCGMAP_H__
2 #define __XRDOUCGMAP_H__
3 /******************************************************************************/
4 /* */
5 /* X r d O u c G M a p . h h */
6 /* */
7 /* (c) 2006 by the Board of Trustees of the Leland Stanford, Jr., University */
8 /* All Rights Reserved */
9 /* Produced by Andrew Hanushevsky for Stanford University under contract */
10 /* DE-AC02-76-SFO0515 with the Department of Energy */
11 /* */
12 /* This file is part of the XRootD software suite. */
13 /* */
14 /* XRootD is free software: you can redistribute it and/or modify it under */
15 /* the terms of the GNU Lesser General Public License as published by the */
16 /* Free Software Foundation, either version 3 of the License, or (at your */
17 /* option) any later version. */
18 /* */
19 /* XRootD is distributed in the hope that it will be useful, but WITHOUT */
20 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
21 /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
22 /* License for more details. */
23 /* */
24 /* You should have received a copy of the GNU Lesser General Public License */
25 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
26 /* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
27 /* */
28 /* The copyright holder's institutional names and contributor's names may not */
29 /* be used to endorse or promote products derived from this software without */
30 /* specific prior written permission of the institution or contributor. */
31 /******************************************************************************/
32 
33 #include "XrdOuc/XrdOucHash.hh"
34 #include "XrdOuc/XrdOucString.hh"
35 #include "XrdSys/XrdSysXSLock.hh"
36 
37 class XrdOucTrace;
38 class XrdSysError;
40 {
41 public:
42  XrdSecGMapEntry_t(const char *v, const char *u, int t) : val(v), user(u), type(t) { }
45  int type;
46 };
47 
49 {
50 public:
51 
52 //------------------------------------------------------------------------------
65 //------------------------------------------------------------------------------
66 
67 virtual int dn2user(const char *dn, char *user, int ulen, time_t now = 0);
68 
69 
70 //------------------------------------------------------------------------------
88 //------------------------------------------------------------------------------
89 #define XrdOucGMapArgs XrdSysError *eDest, \
90  const char *mapfn, \
91  const char *parms
93 
94 //------------------------------------------------------------------------------
96 //------------------------------------------------------------------------------
97 
98 virtual ~XrdOucGMap() {}
99 
100 //------------------------------------------------------------------------------
102 //------------------------------------------------------------------------------
103 
104 bool isValid() const { return valid; }
105 
106 private:
107 //------------------------------------------------------------------------------
109 //------------------------------------------------------------------------------
110 
111 bool valid;
113 XrdOucString mf_name;
114 time_t mf_mtime;
115 time_t notafter;
116 long timeout;
117 
118 XrdSysError *elogger;
119 XrdOucTrace *tracer;
120 bool dbg;
121 
122 XrdSysXSLock xsl;
123 
124 //------------------------------------------------------------------------------
126 //------------------------------------------------------------------------------
127 
128 int load(const char *mf, bool force = 0);
129 };
130 
131 /******************************************************************************/
132 /* X r d O u c g e t G M a p */
133 /******************************************************************************/
134 
135 //------------------------------------------------------------------------------
156 //------------------------------------------------------------------------------
157 
158 //------------------------------------------------------------------------------
164 //------------------------------------------------------------------------------
165 
174 
175 #endif
#define XrdOucGMapArgs
Definition: XrdOucGMap.hh:89
XrdOucGMap * XrdOucgetGMap(XrdOucGMapArgs)
Definition: XrdOucGMap.cc:92
XrdOucGMap(XrdOucGMapArgs)
Definition: XrdOucGMap.cc:103
bool isValid() const
Validity checker.
Definition: XrdOucGMap.hh:104
virtual ~XrdOucGMap()
Destructor.
Definition: XrdOucGMap.hh:98
virtual int dn2user(const char *dn, char *user, int ulen, time_t now=0)
Definition: XrdOucGMap.cc:292
XrdOucString user
Definition: XrdOucGMap.hh:44
XrdOucString val
Definition: XrdOucGMap.hh:43
XrdSecGMapEntry_t(const char *v, const char *u, int t)
Definition: XrdOucGMap.hh:42