12 #ifndef ROOT_XrdProofdManager
13 #define ROOT_XrdProofdManager
33 #include "XrdOuc/XrdOucString.hh"
40 class XrdProofdClient;
41 class XrdProofdClientMgr;
42 class XrdProofdNetMgr;
43 class XrdProofdPriorityMgr;
44 class XrdProofdProofServMgr;
45 class XrdProofdProtocol;
46 class XrdProofGroupMgr;
48 class XrdProofdProofServ;
56 class XrdProofdManager :
public XrdProofdConfig {
59 XrdProofdManager(
char *parms, XrdProtocol_Config *pi, XrdSysError *edest);
60 virtual ~XrdProofdManager();
62 XrdSysRecMutex *Mutex() {
return &fMutex; }
65 int Config(
bool rcf = 0);
66 int DoDirective(XrdProofdDirective *d,
67 char *val, XrdOucStream *cfg,
bool rcf);
68 void RegisterDirectives();
70 int ResolveKeywords(XrdOucString &s, XrdProofdClient *pcl);
72 int GetWorkers(XrdOucString &workers, XrdProofdProofServ *,
const char *);
74 const char *AdminPath()
const {
return fAdminPath.c_str(); }
75 const char *BareLibPath()
const {
return fBareLibPath.c_str(); }
76 bool ChangeOwn()
const {
return fChangeOwn; }
77 void CheckLogFileOwnership();
78 bool CheckMaster(
const char *m);
79 int CheckUser(
const char *usr,
const char *grp, XrdProofUI &ui, XrdOucString &e,
bool &su);
80 int CronFrequency() {
return fCronFrequency; }
81 const char *Host()
const {
return fHost.c_str(); }
82 const char *Image()
const {
return fImage.c_str(); }
83 bool IsSuperMst()
const {
return fSuperMst; }
84 const char *LocalROOT()
const {
return fLocalroot.c_str(); }
85 bool MultiUser()
const {
return fMultiUser; }
86 const char *NameSpace()
const {
return fNamespace.c_str(); }
87 const char *PoolURL()
const {
return fPoolURL.c_str(); }
88 int Port()
const {
return fPort; }
89 int SrvType()
const {
return fSrvType; }
90 const char *SockPathDir()
const {
return fSockPathDir.c_str(); }
91 const char *TMPdir()
const {
return fTMPdir.c_str(); }
92 const char *WorkDir()
const {
return fWorkDir.c_str(); }
93 const char *DataDir()
const {
return fDataDir.c_str(); }
94 const char *DataDirOpts()
const {
return fDataDirOpts.c_str(); }
95 const char *DataDirUrlOpts()
const {
return fDataDirUrlOpts.c_str(); }
96 const char *DataSetExp()
const {
return fDataSetExp.c_str(); }
97 const char *StageReqRepo()
const {
return fStageReqRepo.c_str(); }
99 bool RemotePLite()
const {
return fRemotePLite; }
101 std::list<XrdProofdDSInfo *> *DataSetSrcs() {
return &fDataSetSrcs; }
104 XrdProofdClientMgr *ClientMgr()
const {
return fClientMgr; }
105 const char *EffectiveUser()
const {
return fEffectiveUser.c_str(); }
106 XrdProofGroupMgr *GroupsMgr()
const {
return fGroupsMgr; }
107 XrdProofSched *ProofSched()
const {
return fProofSched; }
108 XrdProofdProofServMgr *SessionMgr()
const {
return fSessionMgr; }
109 XrdProofdNetMgr *NetMgr()
const {
return fNetMgr; }
110 XrdProofdAdmin *Admin()
const {
return fAdmin; }
111 XrdROOTMgr *ROOTMgr()
const {
return fROOTMgr; }
112 XrdProofdPriorityMgr *PriorityMgr()
const {
return fPriorityMgr; }
113 XrdScheduler *Sched()
const {
return fSched; }
115 XrdProtocol *Xrootd()
const {
return fXrootd; }
118 int Process(XrdProofdProtocol *p);
121 XrdSysRecMutex fMutex;
126 XrdOucString fAdminPath;
129 XrdOucString fEffectiveUser;
133 XrdOucString fWorkDir;
134 XrdOucString fMUWorkDir;
137 XrdOucString fBareLibPath;
138 XrdOucString fSockPathDir;
139 XrdOucString fTMPdir;
140 XrdOucString fPoolURL;
141 XrdOucString fNamespace;
142 XrdOucString fLocalroot;
143 XrdOucString fDataDir;
144 XrdOucString fDataDirOpts;
145 XrdOucString fDataDirUrlOpts;
146 XrdOucString fDataSetExp;
147 XrdOucString fStageReqRepo;
149 XrdProtocol *fXrootd;
150 XrdOucString fXrootdLibPath;
151 XrdSysPlugin *fXrootdPlugin;
154 XrdProofdClientMgr *fClientMgr;
155 XrdProofGroupMgr *fGroupsMgr;
156 XrdProofSched *fProofSched;
157 XrdProofdProofServMgr *fSessionMgr;
158 XrdProofdNetMgr *fNetMgr;
159 XrdProofdAdmin *fAdmin;
160 XrdROOTMgr *fROOTMgr;
161 XrdProofdPriorityMgr *fPriorityMgr;
163 XrdScheduler *fSched;
165 XrdOucString fSuperUsers;
168 XrdOucHash<int> fAllowedUsers;
169 XrdOucHash<int> fAllowedGroups;
174 bool fRemoveROOTLibPaths;
175 XrdOucHash<XrdOucString> fLibPathsToRemove;
179 std::list<XrdOucString *> fMastersAllowed;
180 std::list<XrdProofdDSInfo *> fDataSetSrcs;
184 XrdProtocol_Config *fPi;
187 int DoDirectiveAllow(
char *, XrdOucStream *,
bool);
188 int DoDirectiveAllowedGroups(
char *, XrdOucStream *,
bool);
189 int DoDirectiveAllowedUsers(
char *, XrdOucStream *,
bool);
190 int DoDirectiveDataDir(
char *, XrdOucStream *,
bool);
191 int DoDirectiveDataSetSrc(
char *, XrdOucStream *,
bool);
192 int DoDirectiveDataSetReqRepo(
char *, XrdOucStream *,
bool);
193 int DoDirectiveFilterLibPaths(
char *, XrdOucStream *,
bool);
194 int DoDirectiveGroupfile(
char *, XrdOucStream *,
bool);
195 int DoDirectiveMaxOldLogs(
char *, XrdOucStream *,
bool);
196 int DoDirectiveMultiUser(
char *, XrdOucStream *,
bool);
197 int DoDirectivePort(
char *, XrdOucStream *,
bool);
198 int DoDirectiveRole(
char *, XrdOucStream *,
bool);
199 int DoDirectiveRootd(
char *, XrdOucStream *,
bool);
200 int DoDirectiveRootdAllow(
char *, XrdOucStream *,
bool);
201 int DoDirectiveTrace(
char *, XrdOucStream *,
bool);
202 int DoDirectiveXrootd(
char *, XrdOucStream *,
bool);
204 bool ValidateLocalDataSetSrc(XrdOucString &url,
bool &local);
207 XrdProofSched *LoadScheduler();
208 XrdProtocol *LoadXrootd(
char *parms, XrdProtocol_Config *pi, XrdSysError *edest);
213 XrdProofdClientMgr *fClientMgr;
214 XrdProofdProofServMgr *fSessionMgr;
215 XrdProofSched *fProofSched;