XrdSecEntity.hh

Go to the documentation of this file.
00001 #ifndef __SEC_ENTITY_H__
00002 #define __SEC_ENTITY_H__
00003 /******************************************************************************/
00004 /*                                                                            */
00005 /*                       X r d S e c E n t i t y . h h                        */
00006 /*                                                                            */
00007 /* (c) 2005 by the Board of Trustees of the Leland Stanford, Jr., University  */
00008 /*       All Rights Reserved. See XrdInfo.cc for complete License Terms       */
00009 /*   Produced by Andrew Hanushevsky for Stanford University under contract    */
00010 /*              DE-AC03-76-SFO0515 with the Department of Energy              */
00011 /******************************************************************************/
00012 
00013 // This structure is returned during authentication. This is most relevant
00014 // for client authentication unless mutual authentication has been implemented
00015 // in which case the client can also authenticate the server. It is embeded
00016 // in each protocol object to facilitate mutual authentication. Note that the
00017 // destructor does nothing and it is the responsibility of the protocol object
00018 // to delete the XrdSecEntity data members, if need be. This is because
00019 // there can only be one destructor instance for the class and it is ambiguous
00020 // as to which shared library definition should be used. Since protocol objects
00021 // have unique class names, each one can have a private destructor avoiding
00022 // platform specific run-time loader address resolution ecentricities. The OO
00023 // "fix" for this problem would require protocols to define a derived private
00024 // destructor for this object which is more hassle than it's worth.
00025 //
00026 #define XrdSecPROTOIDSIZE 8
00027 
00028 class  XrdSecEntity
00029 {
00030 public:
00031          char   prot[XrdSecPROTOIDSIZE];  // Protocol used
00032          char   *name;                    // Entity's name
00033          char   *host;                    // Entity's host name
00034          char   *vorg;                    // Entity's virtual organization
00035          char   *role;                    // Entity's role
00036          char   *grps;                    // Entity's group names
00037          char   *endorsements;            // Protocol specific endorsements
00038          char   *tident;                  // Trace identifier (do not touch)
00039 
00040          XrdSecEntity(const char *pName = "")
00041                         {strncpy(prot, pName, XrdSecPROTOIDSIZE-1);
00042                          prot[XrdSecPROTOIDSIZE-1] = '\0';
00043                          name=host=vorg=role=grps=endorsements=tident = 0;
00044                         }
00045         ~XrdSecEntity() {}
00046 };
00047 
00048 #define XrdSecClientName XrdSecEntity
00049 #define XrdSecServerName XrdSecEntity
00050 #endif

Generated on Tue Jul 5 14:46:57 2011 for ROOT_528-00b_version by  doxygen 1.5.1