xrootd
Main Page
Namespaces
Classes
Files
File List
File Members
src
XrdAcc
XrdAccConfig.hh
Go to the documentation of this file.
1
#ifndef _ACC_CONFIG_H
2
#define _ACC_CONFIG_H
3
/******************************************************************************/
4
/* */
5
/* X r d A c c C o n f i g . h h */
6
/* */
7
/* (C) 2003 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 Deprtment 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 <sys/types.h>
34
35
#include "
XrdOuc/XrdOuca2x.hh
"
36
#include "
XrdSys/XrdSysError.hh
"
37
#include "
XrdOuc/XrdOucHash.hh
"
38
#include "
XrdSys/XrdSysPthread.hh
"
39
#include "
XrdOuc/XrdOucStream.hh
"
40
#include "
XrdAcc/XrdAccAccess.hh
"
41
#include "
XrdAcc/XrdAccAuthDB.hh
"
42
#include "
XrdAcc/XrdAccCapability.hh
"
43
#include "
XrdAcc/XrdAccGroups.hh
"
44
45
/******************************************************************************/
46
/* X r d A c c G l i s t */
47
/******************************************************************************/
48
49
struct
XrdAccGlist
50
{
51
struct
XrdAccGlist
*
next
;
/* Null if this is the last one */
52
char
*
name
;
/* -> null terminated name */
53
54
XrdAccGlist
(
const
char
*Name,
struct
XrdAccGlist
*Next=0)
55
{
name
= strdup(Name);
next
= Next;}
56
~XrdAccGlist
()
57
{
if
(
name
) free(
name
);}
58
};
59
60
/******************************************************************************/
61
/* X r d A c c C o n f i g */
62
/******************************************************************************/
63
64
class
XrdAccConfig
65
{
66
public
:
67
68
// Configure() is called during initialization.
69
//
70
int
Configure
(
XrdSysError
&Eroute,
const
char
*cfn);
71
72
// ConfigDB() simply refreshes the in-core authorization database. When the
73
// Warm is true, a check is made whether the database actually changed and the
74
// refresh is skipped if it has not changed.
75
//
76
int
ConfigDB
(
int
Warm,
XrdSysError
&Eroute);
77
78
XrdAccAccess
*
Authorization
;
79
XrdAccGroups
GroupMaster
;
80
81
int
AuthRT
;
82
83
XrdAccConfig
();
84
~XrdAccConfig
() {}
// Configuration is never destroyed!
85
86
private
:
87
88
struct
XrdAccGlist
*
addGlist
(gid_t Gid,
const
char
*Gname,
89
struct
XrdAccGlist
*Gnext);
90
int
ConfigDBrec
(
XrdSysError
&Eroute,
91
struct
XrdAccAccess_Tables
&tabs);
92
void
ConfigDefaults
(
void
);
93
int
ConfigFile
(
XrdSysError
&Eroute,
const
char
*cfn);
94
int
ConfigXeq
(
char
*,
XrdOucStream
&,
XrdSysError
&);
95
int
PrivsConvert
(
char
*privs,
XrdAccPrivCaps
&ctab);
96
int
xaud
(
XrdOucStream
&
Config
,
XrdSysError
&Eroute);
97
int
xart
(
XrdOucStream
&
Config
,
XrdSysError
&Eroute);
98
int
xdbp
(
XrdOucStream
&
Config
,
XrdSysError
&Eroute);
99
int
xglt
(
XrdOucStream
&
Config
,
XrdSysError
&Eroute);
100
int
xgrt
(
XrdOucStream
&
Config
,
XrdSysError
&Eroute);
101
int
xnis
(
XrdOucStream
&Cofig,
XrdSysError
&Eroute);
102
103
XrdAccAuthDB
*
Database
;
104
char
*
dbpath
;
105
106
XrdSysMutex
Config_Context
;
107
XrdSysThread
Config_Refresh
;
108
109
int
options
;
110
};
111
#endif
Generated by
1.8.3.1