saf-audit.c File Reference


Detailed Description

ES ESF Manager Auditing.

This module handles audit message processing for ESF Manager. Audit messages are sent to the COBOL Audit Facility.

Definition in file saf-audit.c.

Go to the source code of this file.

Functions

TEventData SafEventData (int type, const void *data, int length)
 Construct a TEventData structure.
mf_uns32 SafInitAuditing (struct SafInit *init)
 ESF Auditing Initialization.
SafRet SafRaiseAuditEvent (int eventid, int category, int numdata,...)
 Raise a general audit event.
SafRet SafRaiseAuditEventA (int eventid, int category, int numdata, struct TEventData *data[])
 Raise a general audit event, with data supplied as an array.


Function Documentation

struct TEventData SafEventData ( int  type,
const void *  data,
int  length 
)

Construct a TEventData structure.

Return a TEventData structure constructed from the input parameters.

Note:
Returned struct types are rvalues, not lvalues. It's valid to pass them as parameters to SafRaiseAuditEvent(), as far as I can tell, which is how this function is currently used; it's valid to assign the return value of this function to a (non-const) struct TEventData variable; and so forth. What doesn't work is eg "SafEventData(a,b,c) = foo".
Parameters:
[in] type Event type
[in] data Pointer to event data
[in] length Length of event data
Returns:
A TEventData structure.

Definition at line 154 of file saf-audit.c.

References TEventData::data.

Referenced by SafAdmin(), SafAuth(), SafUpdate(), SafVerify(), and SafXauth().

mf_uns32 SafInitAuditing ( struct SafInit init  ) 

ESF Auditing Initialization.

This function is invoked by the ESF Manager Initialization routine to set the processing environment.

Parameters:
[in] init ESF Manager initialization area (see SafInit).
Returns:
Zero for success or a SafInitRet value for failure.

Definition at line 175 of file saf-audit.c.

References SafInit::Config, SafGetEnvFunc(), SafINIT_ENVFUNC, and SafINIT_EXTERNAL.

SafRet SafRaiseAuditEvent ( int  eventid,
int  category,
int  numdata,
  ... 
)

Raise a general audit event.

Raise an audit event with the specified ID, category, and optional data.

Parameters:
[in] eventid Event ID
[in] category Event category
[in] numdata Number of TEventData structures that follow
[in] ... TEventData structures containing event data
Returns:
Zero for success or a SafRet value for failure.

Definition at line 248 of file saf-audit.c.

References TEventData::data, TEventData::datalen, TEventData::datatype, audit_event::event_category, audit_event::event_data, audit_event::event_id, audit_event::event_len, audit_event::event_type, SafLog(), SafMsgCRIT, SafR_EXFAIL, SafR_INTERNAL, SafR_OK, and SafR_RESOURCE.

Referenced by SafAdmin(), SafAuth(), safterm(), SafUpdate(), SafVerify(), and SafXauth().

SafRet SafRaiseAuditEventA ( int  eventid,
int  category,
int  numdata,
struct TEventData data[] 
)

Raise a general audit event, with data supplied as an array.

Raise an audit event with the specified ID, category, and optional data supplied as an array rather than variadic parameters.

Parameters:
[in] eventid Event ID
[in] category Event category
[in] numdata Number of TEventData structures that follow
[in] data Array of TEventData structure pointerss containing event data
Returns:
Zero for success or a SafRet value for failure.

Definition at line 346 of file saf-audit.c.

References TEventData::data, TEventData::datalen, TEventData::datatype, audit_event::event_category, audit_event::event_data, audit_event::event_id, audit_event::event_len, audit_event::event_type, and SafR_OK.