00058 :
00059
00060 This function carries
out the Reference Monitor Set Audit
Event
00061 Command. This command enables or disables auditing and optionally
00062 sets
the auditing events.
00063
00064
00065 Arguments:
00066
00067 CommandMessage - Pointer to structure containing RM command message
00068 information consisting of an LPC PORT_MESSAGE structure followed
00069 by
the command number (RmSetAuditStateCommand) and a single command
00070 parameter in structure form.
00071
00072 ReplyMessage - Pointer to structure containing RM reply message
00073 information consisting of an LPC PORT_MESSAGE structure followed
00074 by the command ReturnedStatus field in which a status code from the
00075 command will be returned.
00076
00077 Return Value:
00078
00079 VOID
00080
00081 --*/
00082
00083 {
00084
00085 PPOLICY_AUDIT_EVENT_OPTIONS EventAuditingOptions;
00086 POLICY_AUDIT_EVENT_TYPE EventType;
00087
00088
PAGED_CODE();
00089
00090
SepAdtInitializeBounds();
00091
00092
ReplyMessage->ReturnedStatus = STATUS_SUCCESS;
00093
00094
00095
00096
00097
00098
ASSERT( CommandMessage->CommandNumber == RmAuditSetCommand );
00099
00100
00101
00102
00103
00104
SepAdtAuditingEnabled = (((PLSARM_POLICY_AUDIT_EVENTS_INFO) CommandMessage->CommandParams)->
00105 AuditingMode);
00106
00107
00108
00109
00110
00111
00112 EventAuditingOptions = ((PLSARM_POLICY_AUDIT_EVENTS_INFO) CommandMessage->CommandParams)->
00113 EventAuditingOptions;
00114
00115
00116
for ( EventType=AuditEventMinType;
00117 EventType <= AuditEventMaxType;
00118 EventType++ ) {
00119
00120
SeAuditingState[EventType].
AuditOnSuccess =
FALSE;
00121
SeAuditingState[EventType].
AuditOnFailure =
FALSE;
00122
00123
if ( EventAuditingOptions[EventType] & POLICY_AUDIT_EVENT_SUCCESS ) {
00124
00125
SeAuditingState[EventType].
AuditOnSuccess =
TRUE;
00126 }
00127
00128
if ( EventAuditingOptions[EventType] & POLICY_AUDIT_EVENT_FAILURE ) {
00129
00130
SeAuditingState[EventType].
AuditOnFailure =
TRUE;
00131 }
00132 }
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
if (
SeAuditingState[AuditCategoryDetailedTracking].
AuditOnSuccess &&
SepAdtAuditingEnabled ) {
00150
00151
SeDetailedAuditing =
TRUE;
00152
00153 }
else {
00154
00155
SeDetailedAuditing =
FALSE;
00156 }
00157
00158
return;
00159 }