Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-01-08 10:33:34

0001 #ifndef __SSI_ENTITY_H__
0002 #define __SSI_ENTITY_H__
0003 /******************************************************************************/
0004 /*                                                                            */
0005 /*                       X r d S s i E n t i t y . h h                        */
0006 /*                                                                            */
0007 /* (c) 2014 by the Board of Trustees of the Leland Stanford, Jr., University  */
0008 /*   Produced by Andrew Hanushevsky for Stanford University under contract    */
0009 /*              DE-AC02-76-SFO0515 with the Department of Energy              */
0010 /*                                                                            */
0011 /* This file is part of the XRootD software suite.                            */
0012 /*                                                                            */
0013 /* XRootD is free software: you can redistribute it and/or modify it under    */
0014 /* the terms of the GNU Lesser General Public License as published by the     */
0015 /* Free Software Foundation, either version 3 of the License, or (at your     */
0016 /* option) any later version.                                                 */
0017 /*                                                                            */
0018 /* XRootD is distributed in the hope that it will be useful, but WITHOUT      */
0019 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or      */
0020 /* FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public       */
0021 /* License for more details.                                                  */
0022 /*                                                                            */
0023 /* You should have received a copy of the GNU Lesser General Public License   */
0024 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file  */
0025 /* COPYING (GPL license).  If not, see <http://www.gnu.org/licenses/>.        */
0026 /*                                                                            */
0027 /* The copyright holder's institutional names and contributor's names may not */
0028 /* be used to endorse or promote products derived from this software without  */
0029 /* specific prior written permission of the institution or contributor.       */
0030 /******************************************************************************/
0031 
0032 //------------------------------------------------------------------------------
0033 //! This object describes the authenticated identification of a client and may
0034 //! be used to restrct certain functions based on the identification. Presence
0035 //! of certain members is determined by the actual authnetication method used.
0036 //! This object, if supplied, is only supplied server-side.
0037 //------------------------------------------------------------------------------
0038 
0039 #include <cstring>
0040 
0041 #define XrdSsiPROTOIDSIZE 8
0042 
0043 class  XrdSsiEntity
0044 {
0045 public:
0046          char    prot[XrdSsiPROTOIDSIZE]; //!< Protocol used
0047 const    char   *name;                    //!< Entity's name
0048 const    char   *host;                    //!< Entity's host name or address
0049 const    char   *vorg;                    //!< Entity's virtual organization
0050 const    char   *role;                    //!< Entity's role
0051 const    char   *grps;                    //!< Entity's group names
0052 const    char   *endorsements;            //!< Protocol specific endorsements
0053 const    char   *creds;                   //!< Raw client credentials or cert
0054          int     credslen;                //!< Length of the 'creds' field
0055          int     rsvd;                    //!< Reserved field
0056 const    char   *tident;                  //!< Trace identifier always preset
0057 
0058          XrdSsiEntity(const char *pName = "")
0059                      : name(0), host(0), vorg(0), role(0), grps(0),
0060                        endorsements(0), creds(0), credslen(0),
0061                        rsvd(0), tident("")
0062                      {memset(prot, 0, XrdSsiPROTOIDSIZE);
0063                   strncpy(prot, pName, XrdSsiPROTOIDSIZE-1);
0064                       prot[XrdSsiPROTOIDSIZE-1] = '\0';
0065                      }
0066         ~XrdSsiEntity() {}
0067 };
0068 #endif