The ESF Manager API is used to control the ESF Manager; it includes an initialization function, configuration update notification support, and so forth.
Definition in file safmgr.c.
Go to the source code of this file.
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. | |
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) |
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:
|
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.
Definition at line 163 of file safmgr.c.
References SafInit::Config, SafInit::ESMCfg, SafInit::ESMCnt, SafESM_MAX, SafINIT_BAD_CB, SafINIT_CFG, SafINIT_CNT, SafINIT_ESMCFG, SafINIT_NULL, SafINIT_OK, SafINIT_VER, SafMGR_API_VER, 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) |
Definition at line 538 of file safmgr.c.
References SafEsmExit(), SafEsmUnload(), SafRaiseAuditEvent(), SafTERM_ESF, SafTERM_PROCESS, SafThrLock(), and SafThrUnlock().
int SafState | ( | void | ) |
ESF Manager Run State.
Returns the run state of ESF Manager (uninitialized, running, terminated).
No parameters
Definition at line 597 of file safmgr.c.
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 |
Definition at line 621 of file safmgr.c.
References SafStoreFind().
Referenced by SafAdmin(), and SafVerify().