saf-process.c File Reference

ES ESF Manager Request Processing. More...

Defines

#define saf78_SAFADMIN_DATA_AREAS
#define SafCACHE_MAX_ENTITY_LEN   1024
#define SafPT_UNKNOWN   (1u<<7)
#define SafPT_GEN_ALLOWED   (1u<<0)
#define SafPT_USE_ALLOWED   (1u<<1)

Functions

mf_uns32 SafProcInit (struct SafInit *Init)
 ESF Request Processing Initialization.
int SafVerify (struct safpb_parameter_block *PBlock)
 Process a Verify Request.
int SafAuth (struct safpb_parameter_block *PBlock)
 Process an Auth Request.
int SafXauth (struct safpb_parameter_block *PBlock)
 Process an Xauth Request.
int SafStat (struct safpb_parameter_block *PBlock)
 Process an Stat Request.
int SafAudit (struct safpb_parameter_block *PBlock)
 Process an Audit Request.
int SafAdmin (struct safpb_parameter_block *PBlock)
 Process an Admin Request.
int SafUpdate (struct safpb_parameter_block *PBlock)
 Process an Admin Update Notification Request.

Detailed Description

ES ESF Manager Request Processing.

This module satisfies requests made to the ESF API

by iterating through the configured ESM Modules until one of them provides an authoritive response

. (If none of the ESM Modules provides an authoritive response, the result of the request depends on the setting of the "Allow unknown users" or "Allow unknown resources" options.)


Function Documentation

mf_uns32 SafProcInit ( struct SafInit Init  ) 

ESF Request Processing Initialization.

This function is invoked by the ESF Manager Initialization routine to initialize the request-processing layer.

Parameters:
[in] Init The ESF Manager initialization block
Returns:
An integer value, zero for success and non-zero if initialization failed. See ESF Manager Initialization Return Codes and ESF Manager Initialization Internal Return Codes.

References SafInit::Config, SafInit::ESMCnt, SafInit::FailAudit, SafINIT_OK, SafQueryCfg(), SafR_OK, and SafInit::Version.

Referenced by safmgr().

int SafVerify ( struct safpb_parameter_block PBlock  ) 
int SafAuth ( struct safpb_parameter_block PBlock  ) 
int SafXauth ( struct safpb_parameter_block PBlock  ) 
int SafStat ( struct safpb_parameter_block PBlock  ) 

Process an Stat Request.

Pass a ESF API Stat request to the active ESM Modules.

Parameters:
[in,out] PBlock ESF API parameter block
Returns:
An integer value, as defined by the ESF API; see safapi.h.

References safpb_parameter_block::DISCRETE, safpb_parameter_block::RETCODES, and saf78_SAF_RC_NOT_COMPLETE.

int SafAudit ( struct safpb_parameter_block PBlock  ) 

Process an Audit Request.

Pass a ESF API Audit request to the active ESM Modules.

Parameters:
[in,out] PBlock ESF API parameter block
Returns:
An integer value, as defined by the ESF API; see safapi.h.

References safpb_parameter_block::DISCRETE, safpb_parameter_block::RETCODES, and saf78_SAF_RC_NOT_COMPLETE.

int SafAdmin ( struct safpb_parameter_block PBlock  ) 
int SafUpdate ( struct safpb_parameter_block PBlock  ) 

Process an Admin Update Notification Request.

Handle a request that notifies us of an administrative change in an external security manager. See External Administrative Update Notification for more information.

Update notification processing takes the following steps:

  1. Flush relevant information cached by ESF itself.
  1. If this environment supports multiple processes using ESF and data in shared memory, cache the update request in shared memory for other ESF instances running under this environment and update the ESF update-tracking data. (This information is used by ESF instances to determine whether they've missed multiple updates, in which case they'll need to flush all private cached data.) Note that in these environments notification-request processing is globally serialized.
  1. Pass the update notice on to one or more ESM Modules. If the ESM Index field (safpb_parameter_block::safpb_safesm_index) is nonzero, call only that module (indexed from 1); otherwise, call all enabled modules in turn.
Parameters:
[in,out] PBlock ESF API parameter block
Returns:
An integer value, as defined by the ESF API; see safapi.h.

References safpb_parameter_block::DISCRETE, safpb_parameter_block::REQUESTS, safpb_parameter_block::RETCODES, saf78_FLAG_TRACE, saf78_SAF_RC_FAILURE, saf78_SAF_RC_NOT_COMPLETE, SafCacheUpdate(), SafESM_UPDATE, SafEsmCUpdate(), SafEsmName(), SafESMRC_NOTIMPL, SafESMRC_OK, SafEventData(), SafLog(), SafMsgERR, SafMsgINFO, SafMsgWARN, safpb_parameter_block::safpb_flag, safpb_parameter_block::safpb_safesm_index, safpb_parameter_block::safpb_type, safpb_update::safpb_update_ACEE_ptr, safpb_update::safpb_update_ACTION, safpb_update::safpb_update_ENTITY_len, safpb_update::safpb_update_ENTITY_ptr, SafRaiseAuditEvent(), SafState(), safpb_parameter_block::UPDATE, SafACEE::User, and SafACEE::UserLen.