ES ESF Manager Startup and Control. More...
Enumerations | |
| enum | { SafUNINITIALIZED = 0, SafRUNNING = 1, SafTERMINATED = 2 } |
Functions | |
| BOOL APIENTRY | DllMain (HANDLE Inst, DWORD Reason, LPVOID Reserved) |
| mf_uns32 | safmgr (struct SafInit *Init) |
| ESF Manager Initialization. | |
| mf_uns32 | safterm (mf_uns32 What, void *Reserved) |
| ESF Manager Termination. | |
| mf_uns32 | safcfg (struct SafInit *Init, void *Reserved) |
| ESF Manager Reconfiguration. | |
| mf_uns32 | safcfgesm (int Index, struct cas_esm_config_internal *Config, void *Reserved) |
| ESM Reconfiguration. | |
| int | SafState (void) |
| ESF Manager Run State. | |
| SafRet | SafQueryCfg (const char *Class, const char *Name, char **ValueP) |
| Query ESF Manager Custom Configuration. | |
| mf_uns32 | SafNative32u (mf_uns32 NetValue) |
ES ESF Manager Startup and Control.
The ESF Manager API is used to control the ESF Manager; it includes an initialization function, configuration update notification support, and so forth.
| mf_uns32 safmgr | ( | struct SafInit * | Init | ) |
ESF Manager Initialization.
This function must be invoked before any other ESF Manager functions are used.
After successful initialization, a subsequent initialization has no effect. If initialization fails, it can be retried after the problem has been corrected.
| Init | A pointer to struct SafInit. On entry the following fields must be set:
|
On return, ESF Manager will have set Reason and Detail. They will be zero for success, non-zero for error. If a failure occurred in an ESM Module's initialization (see the description for SafInit::Detail), ESMCnt will be set to the index (from 0) of the ESM Module that reported the error.
References SafInit::Config, SafInit::Detail, SafInit::ESMCfg, SafInit::ESMCnt, SafInit::Reason, SafAllocStore(), SafCacheInit(), SafEnvInit(), SafESM_MAX, SafEsmInit(), SafINIT_BAD_CB, SafINIT_BADENV, SafINIT_CFG, SafINIT_CNT, SafINIT_ENVFUNC, SafINIT_ESMCFG, SafINIT_EXTERNAL, SafINIT_FAIL, SafINIT_NULL, SafINIT_OK, SafINIT_OTHER, SafINIT_RESRCE, SafINIT_VER, SafInitAuditing(), SafLog(), SafMGR_API_VER, SafMGR_FAIL_ENV, SafMGR_FAIL_RESOURCE, SafMsgCRIT, SafProcInit(), SafQueryCfg(), SafR_EXFAIL, SafR_INTERNAL, SafR_NOTFOUND, SafR_PARAM, SafR_RESOURCE, SafR_STATE, SafR_TRUNCATED, SafRaiseAuditEvent(), SafStoreAdd(), SafStoreLoad(), SafThrLock(), SafThrUnlock(), and SafInit::Version.
| mf_uns32 safterm | ( | mf_uns32 | What, | |
| void * | Reserved | |||
| ) |
ESF Manager Termination.
This function should be called when a thread or process that has used ESF is terminating. It will inform the ESM Modules (currently for process exit only), and will perform any necessary cleanup for the Manager itself, including environment-specific cleanup.
| [in] | What | Indicates what is terminating; see "What" Codes for safterm() |
| Reserved | Reserved for future use (pass a null pointer) |
References SafCacheTerminate(), SafEsmExit(), SafEsmUnload(), SafR_PARAM, SafRaiseAuditEvent(), SafTERM_ESF, SafTERM_PROCESS, SafThrLock(), and SafThrUnlock().
| mf_uns32 safcfg | ( | struct SafInit * | Init, | |
| void * | Reserved | |||
| ) |
ESF Manager Reconfiguration.
This function will be provided in the future to reconfigure ESF without stopping and restarting it. Reconfigurable aspects will probably include options such as auditing, configuration text, and so on.
Currently it's not implemented and will return SafR_NOTIMPL.
| Init | A pointer to struct SafInit. See safinit() for details. | |
| Reserved | Reserved for future use (pass a null pointer) |
References SafR_NOTIMPL, and SafR_PARAM.
| mf_uns32 safcfgesm | ( | int | Index, | |
| struct cas_esm_config_internal * | Config, | |||
| void * | Reserved | |||
| ) |
ESM Reconfiguration.
This function lets the caller request that one of the ESMs that was configured in the call to safinit() be asked to update its configuration. If the module does not accept reconfiguration requests, or if it returns an error, safcfgesm will return SafR_ESM.
If the module does support reconfiguration, the aspects that can be updated depend on the module. The MLDAP ESM Module currently supports updating the tracing options that are controlled by the [Trace] section in its configuration text.
Note that the caller should pass the entire ESM configuration, including information that the module may not support updating, just as it was passed to safinit() except with the specific changes desired by the caller. That way, if a newer version of the module supports updating additional aspects, an update request won't unexpectedly change the ESM's behavior.
| [in] | Index | Index of the ESM in the list originally passed to safinit(). The first ESM is 0. |
| [in] | Config | ESM module configuration block. |
| Reserved | Reserved for future use (pass a null pointer) |
References SafESM_RECONFIG, SafEsmCControl(), SafESMRC_EXTERNAL, SafESMRC_FAIL, SafESMRC_MGRFAIL, SafESMRC_NOTIMPL, SafESMRC_OK, SafESMRC_PARAM, SafESMRC_RESOURCE, SafR_ESM, SafR_EXFAIL, SafR_INTERNAL, SafR_NOTIMPL, SafR_OK, SafR_PARAM, and SafR_RESOURCE.
| int SafState | ( | void | ) |
ESF Manager Run State.
Returns the run state of ESF Manager (uninitialized, running, terminated).
No parameters
Referenced by SafAdmin(), SafAuth(), SafUpdate(), SafVerify(), and SafXauth().
| SafRet SafQueryCfg | ( | const char * | Class, | |
| const char * | Name, | |||
| char ** | ValueP | |||
| ) |
Query ESF Manager Custom Configuration.
MFDS provides a "Configuration Information" text area in each Security Manager configuration object. This area can be used to set custom configuration attributes in "ini" format, with name=value pairs grouped under section headings in square brackets.
This function can be used to query the value associated with a name in a given section.
| [in] | Class | Section heading (without the brackets) |
| [in] | Name | Item name |
| [out] | ValueP | Returned pointer to value, if any |
References SafStoreFind().
Referenced by EsmSafQuery(), SafAdmin(), SafCacheInit(), SafEsmInit(), safmgr(), SafProcInit(), and SafVerify().