saf-esm.h

Go to the documentation of this file.
00001 /****************************************************************************
00002  *
00003  * Copyright (C) 2006-2007 Micro Focus (IP) Limited.
00004  * All rights reserved.
00005  *
00006  * The software and information contained herein are proprietary to, and
00007  * comprise valuable trade secrets of, Micro Focus International Ltd., 
00008  * which intends to preserve as trade secrets such software and 
00009  * information. This software is an unpublished copyright of Micro Focus  
00010  * and may not be used, copied, transmitted, or stored in any manner.  
00011  * This software and information or any other copies thereof may not be
00012  * provided or otherwise made available to any other person.
00013  *
00014  *      Enterprise Server SAF (Security) Manager
00015  *      ESM Loader and Interface
00016  *
00017  *      @(#)saf-esm.h   $Revision: 1.6 $     
00018  *
00019  *      $Date: 2008/07/01 08:32:50 $
00020  *
00021  ****************************************************************************/
00022 
00023 /* Start of source module saf-esm.h */
00024 #if !defined(SafESM_H)
00025 #define SafESM_H
00026 
00035 /* Declare structures defined elsewhere */
00036 struct SafInit;
00037 struct SafACEE;
00038 struct safpb_parameter_block;
00039 struct SafStore;
00040 
00041 
00042 /* ESM Module Interface */
00043 
00969 /*** Utility API for ESM Modules ***/
00970 
01011 struct SafEsmApi
01012 {
01013    mf_uns32    VerMajor; 
01015    #define     SafESM_API_VER_MAJ 1 
01016    mf_uns32    VerMinor; 
01018    #define     SafESM_API_VER_MIN 3 
01019    mf_uns32    Count;    
01022    mf_uns32    (*Log)(mf_uns32 Number, mf_uns32 Level, const char *Text,
01023                       mf_uns32 Length, void *Reserved);
01024 
01027    mf_uns32    (*GetAcee)(const char *Name, const char *Group,
01028                           struct SafACEE **AceePtr, mf_uns32 *Info,
01029                           void *Reserved);
01030 
01032    mf_uns32    (*GetSharedMem)(const char *Name, mf_uns32 *SizePtr,
01033                                void **MemPtr, void *Reserved);
01034 
01036    mf_uns32    (*LockEnq)(const char *QName, const char *RName,
01037                           mf_uns32 RNameLen, void *Reserved);
01038 
01040    mf_uns32    (*LockDeq)(const char *QName, const char *RName,
01041                           mf_uns32 RNameLen, void *Reserved);
01042 
01044    mf_uns32    (*GetSafInit)(struct SafInit **InitPtr, void *Reserved);
01045 
01048    mf_uns32    (*ExtractVerifyStrings)(struct safpb_parameter_block *Request,
01049                                        char *UserBuf,  mf_uns32 UserMax,
01050                                        char *PassBuf,  mf_uns32 PassMax,
01051                                        char *NPassBuf, mf_uns32 NPassMax,
01052                                        char *GroupBuf, mf_uns32 GroupMax,
01053                                        void *Reserved);
01054 
01057    mf_uns32    (*ExtractAuthStrings)(struct safpb_parameter_block *Request,
01058                                      char *ClassBuf,    mf_uns32 ClassMax,
01059                                      char *EntityBuf,   mf_uns32 EntityMax,
01060                                      char *FacilityBuf, mf_uns32 FacilityMax,
01061                                      char *TransBuf,    mf_uns32 TransMax,
01062                                      void *Reserved);
01063 
01065    int         (*CasMessage)();
01066 
01068    int         (*CasService)();
01069 
01071    int         (*CasLockMgr)();
01072 
01075    mf_uns32    (*ExtractXAuthStrings)(struct safpb_parameter_block *Request,
01076                                       char *ClassBuf,    mf_uns32 ClassMax,
01077                                       char *EntityBuf,   mf_uns32 EntityMax,
01078                                       char *FacilityBuf, mf_uns32 FacilityMax,
01079                                       char *TransBuf,    mf_uns32 TransMax,
01080                                       void *Reserved);
01081 
01084    mf_uns32    (*SafQuery)(mf_uns32 Type, void *Result, mf_uns32 ResSize,
01085                            void *Reserved);
01086 
01089    mf_uns32    (*ParseConfig)(const char *Text, struct SafStore **Result,
01090                               void *Reserved);
01091 
01094    mf_uns32    (*QueryConfig)(struct SafStore *Config,
01095                               const char *Class, const char *Name,
01096                               char **Value, void *Reserved);
01097 
01099    mf_uns32    (*FreeConfig)(struct SafStore *Config, void *Reserved);
01100 
01102    mf_uns32    (*AceeIterate)(void *Data,
01103                               int (*Callback)(struct SafACEE *, void *),
01104                               void *Reserved);
01105 };
01106 
01107 
01110 #define SafQUERY_MT     1  
01111 #define SafQUERY_ALLGRP 2  
01113 
01114 
01115 
01116 /*** Interface into ESM Modules ***/
01117 
01118 
01148 struct SafPTab
01149 {
01150    mf_uns32     Version; 
01151    #define      SafESM_PT_VER  1       
01172    mf_uns32     (*Init)(const mf_uns32 *Index,
01173                         struct cas_esm_config_internal *Config,
01174                         const struct SafEsmApi *Api, void *Reserved);
01175 
01188    mf_uns32     (*Info)(const char **Name, mf_uns32 *IFVersion,
01189                         const unsigned char **Signature, void *Reserved);
01190    #define      SafESM_IF_VER  1       
01199    mf_uns32     (*Verify)(struct safpb_parameter_block *Request,
01200                           void *Reserved);
01201 
01209    mf_uns32     (*Auth)(struct safpb_parameter_block *Request, void *Reserved);
01210 
01218    mf_uns32     (*XAuth)(struct safpb_parameter_block *Request, void *Reserved);
01219 
01229    mf_uns32     (*Update)(mf_s32 Type, struct safpb_parameter_block *Request,
01230                           void *Reserved);
01233    #define      SafESM_UPDATE  0       
01234    #define      SafESM_UPDATED 1       
01236    #define      SafESM_REFRESH 2       
01239 
01240 
01245    mf_uns32     (*Status)();
01246 
01255    mf_uns32     (*Control)();
01256 
01266    mf_uns32     (*Exit)(const mf_uns32 *Index, void *Reserved);
01267 
01275    mf_uns32     (*Admin)(struct safpb_parameter_block *Request,
01276                          void *Reserved);
01277 
01281    mf_uns32     (*Reserved)();
01282 };
01283 
01284 
01287 #define SafESMRC_OK          0   
01288 #define SafESMRC_NOTIMPL     1   
01289 #define SafESMRC_PARAM       2   
01290 #define SafESMRC_RESOURCE    3   
01291 #define SafESMRC_EXTERNAL    4   
01292 #define SafESMRC_MGRFAIL     5   
01293 #define SafESMRC_FAIL      100   
01295 
01296 
01297 
01298 /*** ESM Loader Interface ***/
01299 
01300 mf_uns32 SafEsmInit(struct SafInit *Init);
01301 mf_uns32 SafEsmExit(void);
01302 
01303 mf_uns32 SafEsmEnable(mf_uns32 Index);
01304 mf_uns32 SafEsmDisable(mf_uns32 Index);
01305 
01306 const char *SafEsmName(mf_uns32 Index);
01307 
01308 /* Cover routines for ESM Module procedures */
01309 mf_uns32 SafEsmCVerify(mf_uns32 EsmIdx, struct safpb_parameter_block *);
01310 mf_uns32 SafEsmCAuth(mf_uns32 EsmIdx, struct safpb_parameter_block *);
01311 mf_uns32 SafEsmCXAuth(mf_uns32 EsmIdx, struct safpb_parameter_block *);
01312 mf_uns32 SafEsmCAdmin(mf_uns32 EsmIdx, struct safpb_parameter_block *);
01313 mf_uns32 SafEsmCUpdate(mf_s32 Type, mf_uns32 EsmIdx,
01314                        struct safpb_parameter_block *);
01315 
01316 
01317 #endif
01318 
01319 /* End of saf-esm.h */
01320