xrootd
Loading...
Searching...
No Matches
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"
44
45/******************************************************************************/
46/* X r d A c c G l i s t */
47/******************************************************************************/
48
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;}
57 {if (name) free(name);}
58};
59
60/******************************************************************************/
61/* X r d A c c C o n f i g */
62/******************************************************************************/
63
65{
66public:
67
68// Configure() is called during initialization.
69//
70int 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//
76int ConfigDB(int Warm, XrdSysError &Eroute);
77
80
82
84 ~XrdAccConfig() {} // Configuration is never destroyed!
85
86private:
87
88struct XrdAccGlist *addGlist(gid_t Gid, const char *Gname,
89 struct XrdAccGlist *Gnext);
91 struct XrdAccAccess_Tables &tabs);
92void ConfigDefaults(void);
93int ConfigFile(XrdSysError &Eroute, const char *cfn);
95void idChk(XrdSysError &Eroute, XrdAccAccess_ID *idList,
98 const char *idName);
99void subSpace(char *id);
100int PrivsConvert(char *privs, XrdAccPrivCaps &ctab);
101
102int xaud(XrdOucStream &Config, XrdSysError &Eroute);
103int xart(XrdOucStream &Config, XrdSysError &Eroute);
104int xdbp(XrdOucStream &Config, XrdSysError &Eroute);
105int xenc(XrdOucStream &Config, XrdSysError &Eroute);
106int xglt(XrdOucStream &Config, XrdSysError &Eroute);
107int xgrt(XrdOucStream &Config, XrdSysError &Eroute);
108int xnis(XrdOucStream &Cofig, XrdSysError &Eroute);
109int xspc(XrdOucStream &Cofig, XrdSysError &Eroute);
110
112char *dbpath;
113
116
121};
122#endif
Definition XrdAccAccess.hh:128
Definition XrdAccAuthDB.hh:86
Definition XrdAccConfig.hh:65
void subSpace(char *id)
int Configure(XrdSysError &Eroute, const char *cfn)
int options
Definition XrdAccConfig.hh:117
int xglt(XrdOucStream &Config, XrdSysError &Eroute)
int xgrt(XrdOucStream &Config, XrdSysError &Eroute)
int xart(XrdOucStream &Config, XrdSysError &Eroute)
void idChk(XrdSysError &Eroute, XrdAccAccess_ID *idList, XrdAccAccess_Tables &tabs)
void ConfigDefaults(void)
int ConfigFile(XrdSysError &Eroute, const char *cfn)
bool uriPath
Definition XrdAccConfig.hh:120
char spChar
Definition XrdAccConfig.hh:119
int xnis(XrdOucStream &Cofig, XrdSysError &Eroute)
int rulenum
Definition XrdAccConfig.hh:118
int idDef(XrdSysError &Eroute, XrdAccAccess_Tables &tabs, const char *idName)
int xdbp(XrdOucStream &Config, XrdSysError &Eroute)
XrdSysMutex Config_Context
Definition XrdAccConfig.hh:114
int xaud(XrdOucStream &Config, XrdSysError &Eroute)
XrdAccAccess * Authorization
Definition XrdAccConfig.hh:78
int xenc(XrdOucStream &Config, XrdSysError &Eroute)
~XrdAccConfig()
Definition XrdAccConfig.hh:84
struct XrdAccGlist * addGlist(gid_t Gid, const char *Gname, struct XrdAccGlist *Gnext)
XrdSysThread Config_Refresh
Definition XrdAccConfig.hh:115
int ConfigDB(int Warm, XrdSysError &Eroute)
int PrivsConvert(char *privs, XrdAccPrivCaps &ctab)
XrdAccAuthDB * Database
Definition XrdAccConfig.hh:111
int AuthRT
Definition XrdAccConfig.hh:81
int ConfigXeq(char *, XrdOucStream &, XrdSysError &)
XrdAccGroups GroupMaster
Definition XrdAccConfig.hh:79
int xspc(XrdOucStream &Cofig, XrdSysError &Eroute)
char * dbpath
Definition XrdAccConfig.hh:112
int ConfigDBrec(XrdSysError &Eroute, struct XrdAccAccess_Tables &tabs)
Definition XrdAccGroups.hh:97
Definition XrdOucStream.hh:47
Definition XrdSysError.hh:90
Definition XrdSysPthread.hh:165
Definition XrdSysPthread.hh:551
Definition XrdAccAccess.hh:48
Definition XrdAccAccess.hh:86
Definition XrdAccConfig.hh:50
~XrdAccGlist()
Definition XrdAccConfig.hh:56
char * name
Definition XrdAccConfig.hh:52
XrdAccGlist(const char *Name, struct XrdAccGlist *Next=0)
Definition XrdAccConfig.hh:54
struct XrdAccGlist * next
Definition XrdAccConfig.hh:51
Definition XrdAccPrivs.hh:77