00001 #ifndef __XRDDIGCONFIG_HH__
00002 #define __XRDDIGCONFIG_HH__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 class XrdOucStream;
00034 class XrdOucErrInfo;
00035 class XrdSecEntity;
00036 struct stat;
00037
00038 class XrdDigConfig
00039 {
00040 public:
00041
00042
00043 bool Configure(const char *cFN, const char *parms);
00044
00045 enum pType {isAny = 0, isDir, isFile};
00046
00047 int GenAccess(const XrdSecEntity *client,
00048 const char *aList[],
00049 int aMax);
00050
00051 char *GenPath(int &rc, const XrdSecEntity *client, const char *opname,
00052 const char *lfn, pType lfnType=isAny);
00053
00054 void GetLocResp(XrdOucErrInfo &eInfo, bool nameok);
00055
00056 static
00057 void StatRoot(struct stat *sP);
00058
00059 XrdDigConfig() : fnTmplt(0), logAcc(true), logRej(true) {}
00060 ~XrdDigConfig() {}
00061
00062 private:
00063
00064 const char *AddPath(XrdDigConfig::pType sType, const char *src,
00065 const char *tpd, const char *tfn);
00066 void Audit(const XrdSecEntity *client, const char *what,
00067 const char *opn, const char *trg);
00068 bool ConfigProc(const char *ConfigFN);
00069 bool ConfigXeq(char *var, XrdOucStream &cFile);
00070 void Empty(const char *path);
00071 void SetLocResp();
00072 int ValProc(const char *ppath);
00073 bool xacf(XrdOucStream &cFile);
00074 bool xlog(XrdOucStream &cFile);
00075
00076 char *fnTmplt;
00077 char *locRespHP;
00078 char *locRespV6;
00079 char *locRespV4;
00080 short locRlenHP;
00081 short locRlenV6;
00082 short locRlenV4;
00083 bool logAcc;
00084 bool logRej;
00085 };
00086 #endif