00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #if !defined(SafESM_H)
00025 #define SafESM_H
00026
00035
00036 struct SafInit;
00037 struct SafACEE;
00038 struct safpb_parameter_block;
00039 struct SafStore;
00040
00041
00042
00043
00971
00972
01013 struct SafEsmApi
01014 {
01015 mf_uns32 VerMajor;
01017 #define SafESM_API_VER_MAJ 1
01018 mf_uns32 VerMinor;
01020 #define SafESM_API_VER_MIN 3
01021 mf_uns32 Count;
01024 mf_uns32 (*Log)(mf_uns32 Number, mf_uns32 Level, const char *Text,
01025 mf_uns32 Length, void *Reserved);
01026
01029 mf_uns32 (*GetAcee)(const char *Name, const char *Group,
01030 struct SafACEE **AceePtr, mf_uns32 *Info,
01031 void *Reserved);
01032
01034 mf_uns32 (*GetSharedMem)(const char *Name, mf_uns32 *SizePtr,
01035 void **MemPtr, void *Reserved);
01036
01038 mf_uns32 (*LockEnq)(const char *QName, const char *RName,
01039 mf_uns32 RNameLen, void *Reserved);
01040
01042 mf_uns32 (*LockDeq)(const char *QName, const char *RName,
01043 mf_uns32 RNameLen, void *Reserved);
01044
01046 mf_uns32 (*GetSafInit)(struct SafInit **InitPtr, void *Reserved);
01047
01050 mf_uns32 (*ExtractVerifyStrings)(struct safpb_parameter_block *Request,
01051 char *UserBuf, mf_uns32 UserMax,
01052 char *PassBuf, mf_uns32 PassMax,
01053 char *NPassBuf, mf_uns32 NPassMax,
01054 char *GroupBuf, mf_uns32 GroupMax,
01055 void *Reserved);
01056
01059 mf_uns32 (*ExtractAuthStrings)(struct safpb_parameter_block *Request,
01060 char *ClassBuf, mf_uns32 ClassMax,
01061 char *EntityBuf, mf_uns32 EntityMax,
01062 char *FacilityBuf, mf_uns32 FacilityMax,
01063 char *TransBuf, mf_uns32 TransMax,
01064 void *Reserved);
01065
01067 int (*CasMessage)();
01068
01070 int (*CasService)();
01071
01073 int (*CasLockMgr)();
01074
01077 mf_uns32 (*ExtractXAuthStrings)(struct safpb_parameter_block *Request,
01078 char *ClassBuf, mf_uns32 ClassMax,
01079 char *EntityBuf, mf_uns32 EntityMax,
01080 char *FacilityBuf, mf_uns32 FacilityMax,
01081 char *TransBuf, mf_uns32 TransMax,
01082 void *Reserved);
01083
01086 mf_uns32 (*SafQuery)(mf_uns32 Type, void *Result, mf_uns32 ResSize,
01087 void *Reserved);
01088
01091 mf_uns32 (*ParseConfig)(const char *Text, struct SafStore **Result,
01092 void *Reserved);
01093
01096 mf_uns32 (*QueryConfig)(struct SafStore *Config,
01097 const char *Class, const char *Name,
01098 char **Value, void *Reserved);
01099
01101 mf_uns32 (*FreeConfig)(struct SafStore *Config, void *Reserved);
01102
01104 mf_uns32 (*AceeIterate)(void *Data,
01105 int (*Callback)(struct SafACEE *, void *),
01106 void *Reserved);
01107 };
01108
01109
01112 #define SafQUERY_MT 1
01113 #define SafQUERY_ALLGRP 2
01115
01116
01117
01118
01119
01120
01150 struct SafPTab
01151 {
01152 mf_uns32 Version;
01153 #define SafESM_PT_VER 1
01174 mf_uns32 (*Init)(const mf_uns32 *Index,
01175 struct cas_esm_config_internal *Config,
01176 const struct SafEsmApi *Api, void *Reserved);
01177
01190 mf_uns32 (*Info)(const char **Name, mf_uns32 *IFVersion,
01191 const unsigned char **Signature, void *Reserved);
01192 #define SafESM_IF_VER 1
01201 mf_uns32 (*Verify)(struct safpb_parameter_block *Request,
01202 void *Reserved);
01203
01211 mf_uns32 (*Auth)(struct safpb_parameter_block *Request, void *Reserved);
01212
01220 mf_uns32 (*XAuth)(struct safpb_parameter_block *Request, void *Reserved);
01221
01231 mf_uns32 (*Update)(mf_s32 Type, struct safpb_parameter_block *Request,
01232 void *Reserved);
01235 #define SafESM_UPDATE 0
01236 #define SafESM_UPDATED 1
01238 #define SafESM_REFRESH 2
01241
01242
01247 mf_uns32 (*Status)();
01248
01257 mf_uns32 (*Control)();
01258
01268 mf_uns32 (*Exit)(const mf_uns32 *Index, void *Reserved);
01269
01277 mf_uns32 (*Admin)(struct safpb_parameter_block *Request,
01278 void *Reserved);
01279
01283 mf_uns32 (*Reserved)();
01284 };
01285
01286
01289 #define SafESMRC_OK 0
01290 #define SafESMRC_NOTIMPL 1
01291 #define SafESMRC_PARAM 2
01292 #define SafESMRC_RESOURCE 3
01293 #define SafESMRC_EXTERNAL 4
01294 #define SafESMRC_MGRFAIL 5
01295 #define SafESMRC_FAIL 100
01297
01298
01299
01300
01301
01302 mf_uns32 SafEsmInit(struct SafInit *Init);
01303 mf_uns32 SafEsmExit(void);
01304 mf_uns32 SafEsmUnload(void);
01305
01306 mf_uns32 SafEsmEnable(mf_uns32 Index);
01307 mf_uns32 SafEsmDisable(mf_uns32 Index);
01308
01309 const char *SafEsmName(mf_uns32 Index);
01310
01311
01312 mf_uns32 SafEsmCVerify(mf_uns32 EsmIdx, struct safpb_parameter_block *);
01313 mf_uns32 SafEsmCAuth(mf_uns32 EsmIdx, struct safpb_parameter_block *);
01314 mf_uns32 SafEsmCXAuth(mf_uns32 EsmIdx, struct safpb_parameter_block *);
01315 mf_uns32 SafEsmCAdmin(mf_uns32 EsmIdx, struct safpb_parameter_block *);
01316 mf_uns32 SafEsmCUpdate(mf_s32 Type, mf_uns32 EsmIdx,
01317 struct safpb_parameter_block *);
01318
01319
01320 #endif
01321
01322
01323