xrootd
|
00001 #ifndef __XRDSECSERVER_H__ 00002 #define __XRDSECSERVER_H__ 00003 /******************************************************************************/ 00004 /* */ 00005 /* X r d S e c S e r v e r . h h */ 00006 /* */ 00007 /* (c) 2005 by the Board of Trustees of the Leland Stanford, Jr., University */ 00008 /* All Rights Reserved */ 00009 /* Produced by Andrew Hanushevsky for Stanford University under contract */ 00010 /* DE-AC03-76-SFO0515 with the Department of Energy */ 00011 /******************************************************************************/ 00012 00013 // $Id$ 00014 00015 #include "XrdSys/XrdSysError.hh" 00016 #include "XrdSys/XrdSysLogger.hh" 00017 #include "XrdOuc/XrdOucStream.hh" 00018 #include "XrdSec/XrdSecInterface.hh" 00019 #include "XrdSec/XrdSecPManager.hh" 00020 00021 class XrdSecProtBind; 00022 class XrdOucTrace; 00023 00024 class XrdSecServer : XrdSecService 00025 { 00026 public: 00027 00028 const char *getParms(int &size, const char *hname=0); 00029 00030 // = 0 -> No protocol can be returned (einfo has the reason) 00031 // ! 0 -> Address of protocol object is bing returned. 00032 // 00033 XrdSecProtocol *getProtocol(const char *host, // In 00034 const struct sockaddr &hadr, // In 00035 const XrdSecCredentials *cred, // In 00036 XrdOucErrInfo *einfo=0);// Out 00037 00038 int Configure(const char *cfn); 00039 00040 XrdSecServer(XrdSysLogger *lp); 00041 ~XrdSecServer() {} // Server is never deleted 00042 00043 private: 00044 00045 static XrdSecPManager PManager; 00046 00047 XrdSysError eDest; 00048 XrdOucTrace *SecTrace; 00049 XrdSecProtBind *bpFirst; 00050 XrdSecProtBind *bpLast; 00051 XrdSecProtBind *bpDefault; 00052 char *SToken; 00053 char *STBuff; 00054 int STBlen; 00055 int Enforce; 00056 int implauth; 00057 00058 int add2token(XrdSysError &erp,char *,char **,int &,XrdSecPMask_t &); 00059 int ConfigFile(const char *cfn); 00060 int ConfigXeq(char *var, XrdOucStream &Config, XrdSysError &Eroute); 00061 int ProtBind_Complete(XrdSysError &Eroute); 00062 int xpbind(XrdOucStream &Config, XrdSysError &Eroute); 00063 int xpparm(XrdOucStream &Config, XrdSysError &Eroute); 00064 int xprot(XrdOucStream &Config, XrdSysError &Eroute); 00065 int xtrace(XrdOucStream &Config, XrdSysError &Eroute); 00066 }; 00067 #endif