z/OS Security Server RACF Macros and Interfaces
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


The irrspim.h header file

z/OS Security Server RACF Macros and Interfaces
SA23-2288-00

This topic contains a copy of the irrspim.h header file.

Figure 1. The irrspim.h header file
/**START OF SPECIFICATIONS*******************************************
 *                                                                  *
 *  Macro Name: irrspim                                             *
 *                                                                  *
 *  Descriptive Name: SAF user mapping plug-in interface            *
 *------------------------------------------------------------------*
 *   Proprietary statement:                                         *
 *                                                                  *
 *    LICENSED MATERIALS - PROPERTY OF IBM                          *
 *    THIS MACRO IS "RESTRICTED MATERIALS OF IBM"                   *
 *    5637-A01 (C) COPYRIGHT IBM CORP. 2006                         *
 *                                                                  *
 *   Status = HBB7730                                               *
 *------------------------------------------------------------------*
 *                                                                  *
 *   EXTERNAL CLASSIFICATION: PI                                    *
 *   END OF EXTERNAL CLASSIFICATION:                                *
 *                                                                  *
 *  Component: SC1BN                                                *
 *                                                                  *
 *  Function:                                                       *
 *    This file contains C/C++ function prototypes and              *
 *    related definitions for the SAF user mapping plug-in          *
 *    interface.                                                    *
 *                                                                  *
 *  Prototypes defined:                                             *
 *                                                                  *
 *    Function           Service                                    *
 *    -----------------------------------------------------------   *
 *    safMappingInit()   Initializes the connection to the plug-in  *
 *                       implementation.                            *
 *    safMappingLookup() Returns z/OS user credentials that have a  *  
 *                       mapping from the source user credentials.  *  
 *    safMappingTerm()   Closes the connection with the plug-in     *  
 *                       implementation and cleans up resources.    *  
 *                                                                  *  
 *                                                                  *  
 *  Method of Access:                                               *  
 *    Add to the source program:                                    *  
 *      #include <irrspim.h>                                        *  
 *                                                                  *  
 *    Include in the link edit:                                     *  
 *      irrspim.x                                                   *  
 *                                                                  *  
 **END OF SPECIFICATIONS*********************************************/ 
#ifndef IRRSPIM_h                                                      
#define IRRSPIM_h                                                      
#ifdef __cplusplus                                                     
   #pragma info(none)                                                  
   extern "C" {                                                        
#else                                                                  
   #pragma nomargins nosequence                                        
   #pragma checkout(suspend)                                           
#endif                                                                 
                                                                       
                                                                       
/*--- Constants -----------------------------------------------------*/
                                                                        
/*-- SAF and mapping plug-in return codes -----*/                       
#define SAFMAP_OK       0                                               
#define SAFMAP_WARNING  4                                               
#define SAFMAP_ERROR    8                                               
#define SAFMAP_SEVERE  12                                               
                                                                        
/*-- Additional mapping plug-in return codes --*/                       
#define SAFMAP_ERROR_INTERFACE 16                                       
#define SAFMAP_ERROR_NOTCONN   20                                       
#define SAFMAP_ERROR_NOTSUP    24                                       
#define SAFMAP_ERROR_PARMERR   28                                       
#define SAFMAP_ERROR_PLUGIN    32                                       
#define SAFMAP_ERROR_SETUP     36                                       
#define SAFMAP_MANY_FOUND       2                                       
#define SAFMAP_NONE_RETURNED    0                                       
#define SAFMAP_ONE_RETURNED     1                                       
                                                                        
/*-- credsType values -------------------------*/                       
#define SAFMAP_REGISTRY_USER 0                                          
#define SAFMAP_USER_ONLY     1                                          
                                                                        
/*-- Miscellaneous ----------------------------*/                       
#define SAFMAP_EYECATCHER     "SAFMAPH"                                 
#define SAFMAP_DEFAULT_CCSID  1047                                      
#define SAFMAP_DEFAULT_PLUGIN NULL                                                                                                              
/*--- Typedefs for parameters ---------------------------------------*/ 
typedef struct _SafmapCreds {                                           
  int   credsType;                                                      
  int   credsCCSID;                                             
  union {                                                               
                                                                        
    struct _UserOnly {                                                  
      char * user;                                                      
    } UserOnly;                                                         
                                                                        
    struct _RegistryUser {                                              
      char * registry;    /*-- Syntax is plug-in specific. --*/         
      char * user;                                                      
    } RegistryUser;                                                     
                                                                        
  } credsData;                                                          
} SafmapCreds;                                                          
                                                                        
typedef struct _SafmapErr {                                             
  int  mpiReturnCode;                                                   
  int  mpiReasonCode;                                                   
  char mpiVersion[128];                                                 
  char mpiInfo[128];                                                    
  char message[256];                                                    
} SafmapErr;                                                            
                                                                        
typedef struct _SafmapHandle {                                          
  char   eyecatcher[8];                                                 
  void * mpiData;                                                       
  void * dllHandle;                                                     
  void * rmapinit;                                                      
  void * rmaplook;                                                      
  void * rmapterm;                                                      
} SafmapHandle;                                                         
                                                                        
typedef struct _SafmapResult {                                          
  int         bytesAvailable;                                           
  int         credentialLen;                                    
  SafmapCreds resultCreds;                                              
} SafmapResult;           /*-- SafmapCreds follow this header --*/                                                                              
/*--- safMappingInit()  ---------------------------------------------*/ 
                                                                        
int safMappingInit(                                                     
  SafmapHandle * mh,      /*-- (Required) mapping handle         --*/   
  char         * dllName, /*-- (Optional) defaults to irrspime   --*/   
  SafmapErr    * mErr     /*-- (Required) mapping error          --*/   
  );                                                                    
                                                                        
/*--- safMappingLookup() --------------------------------------------*/ 
                                                                        
int safMappingLookup(                                                   
  SafmapHandle * mh,      /*-- (Required) mapping handle          --*/  
  SafmapCreds  * sUser,   /*-- (Required) source user credentials --*/  
  char         * aData,   /*-- (Optional) application data        --*/  
  SafmapResult * mResult, /*-- (Required) mapping result          --*/  
  SafmapErr    * mErr     /*-- (Required) mapping error           --*/  
  );                                                                    
                                                                        
/*--- safMappingTerm()  ---------------------------------------------*/ 
                                                                        
int safMappingTerm(                                                     
  SafmapHandle * mh,      /*-- (Required) mapping handle          --*/  
  SafmapErr    * mErr     /*-- (Required) mapping error           --*/  
  );                                                                    
                                                                        
#ifdef __cplusplus                                                      
   }                                                                    
#endif                                                                  
                                                                        
#endif /* IRRSPIM_h */   

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014