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 // $Id: XrdSecEntity.hh,v 1.2 2007/08/01 22:04:56 abh Exp $ 00014 00015 // This structure is returned during authentication. This is most relevant 00016 // for client authentication unless mutual authentication has been implemented 00017 // in which case the client can also authenticate the server. It is embeded 00018 // in each protocol object to facilitate mutual authentication. Note that the 00019 // destructor does nothing and it is the responsibility of the protocol object 00020 // to delete the XrdSecEntity data members, if need be. This is because 00021 // there can only be one destructor instance for the class and it is ambiguous 00022 // as to which shared library definition should be used. Since protocol objects 00023 // have unique class names, each one can have a private destructor avoiding 00024 // platform specific run-time loader address resolution ecentricities. The OO 00025 // "fix" for this problem would require protocols to define a derived private 00026 // destructor for this object which is more hassle than it's worth. 00027 // 00028 #define XrdSecPROTOIDSIZE 8 00029 00030 class XrdSecEntity 00031 { 00032 public: 00033 char prot[XrdSecPROTOIDSIZE]; // Protocol used 00034 char *name; // Entity's name 00035 char *host; // Entity's host name 00036 char *vorg; // Entity's virtual organization 00037 char *role; // Entity's role 00038 char *grps; // Entity's group names 00039 char *endorsements; // Protocol specific endorsements 00040 char *tident; // Trace identifier (do not touch) 00041 00042 XrdSecEntity() {prot[0] = '\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
1.7.1