xrootd
Loading...
Searching...
No Matches
XrdDigConfig.hh
Go to the documentation of this file.
1#ifndef __XRDDIGCONFIG_HH__
2#define __XRDDIGCONFIG_HH__
3/******************************************************************************/
4/* */
5/* X r d D i g C o n f i g . h h */
6/* */
7/* (C) 2013 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
33class XrdOucStream;
34class XrdOucErrInfo;
35class XrdSecEntity;
36struct stat;
37
39{
40public:
41
42
43bool Configure(const char *cFN, const char *parms);
44
45enum pType {isAny = 0, isDir, isFile};
46
47int GenAccess(const XrdSecEntity *client,
48 const char *aList[],
49 int aMax);
50
51char *GenPath(int &rc, const XrdSecEntity *client, const char *opname,
52 const char *lfn, pType lfnType=isAny);
53
54void GetLocResp(XrdOucErrInfo &eInfo, bool nameok);
55
56static
57void StatRoot(struct stat *sP);
58
59 XrdDigConfig() : fnTmplt(0), logAcc(true), logRej(true) {}
61
62private:
63
64const char *AddPath(XrdDigConfig::pType sType, const char *src,
65 const char *tpd, const char *tfn);
66void Audit(const XrdSecEntity *client, const char *what,
67 const char *opn, const char *trg);
68bool ConfigProc(const char *ConfigFN);
69bool ConfigXeq(char *var, XrdOucStream &cFile);
70void Empty(const char *path);
72int ValProc(const char *ppath);
73bool xacf(XrdOucStream &cFile);
74bool xlog(XrdOucStream &cFile);
75
76char *fnTmplt;
83bool logAcc;
84bool logRej;
85};
86#endif
#define stat(a, b)
Definition XrdPosix.hh:96
Definition XrdDigConfig.hh:39
bool logRej
Definition XrdDigConfig.hh:84
char * locRespV6
Definition XrdDigConfig.hh:78
int GenAccess(const XrdSecEntity *client, const char *aList[], int aMax)
XrdDigConfig()
Definition XrdDigConfig.hh:59
short locRlenHP
Definition XrdDigConfig.hh:80
short locRlenV4
Definition XrdDigConfig.hh:82
static void StatRoot(struct stat *sP)
char * locRespHP
Definition XrdDigConfig.hh:77
bool xacf(XrdOucStream &cFile)
pType
Definition XrdDigConfig.hh:45
@ isFile
Definition XrdDigConfig.hh:45
@ isDir
Definition XrdDigConfig.hh:45
@ isAny
Definition XrdDigConfig.hh:45
void Empty(const char *path)
bool ConfigXeq(char *var, XrdOucStream &cFile)
short locRlenV6
Definition XrdDigConfig.hh:81
void SetLocResp()
char * locRespV4
Definition XrdDigConfig.hh:79
char * GenPath(int &rc, const XrdSecEntity *client, const char *opname, const char *lfn, pType lfnType=isAny)
~XrdDigConfig()
Definition XrdDigConfig.hh:60
void GetLocResp(XrdOucErrInfo &eInfo, bool nameok)
bool xlog(XrdOucStream &cFile)
char * fnTmplt
Definition XrdDigConfig.hh:76
bool Configure(const char *cFN, const char *parms)
void Audit(const XrdSecEntity *client, const char *what, const char *opn, const char *trg)
bool ConfigProc(const char *ConfigFN)
bool logAcc
Definition XrdDigConfig.hh:83
const char * AddPath(XrdDigConfig::pType sType, const char *src, const char *tpd, const char *tfn)
int ValProc(const char *ppath)
Definition XrdOucErrInfo.hh:101
Definition XrdOucStream.hh:47
Definition XrdSecEntity.hh:65