@@ -619,6 +619,9 @@ static int normalize_syscall(auparse_state_t *au, const char *syscall)
619
619
if (objtype == NORM_UNKNOWN )
620
620
normalize_syscall_map_s2i (syscall , & objtype );
621
621
622
+ // FIXME: Need to address: landlock_*, lsm_*, map_shadow_stack, pkey_*,
623
+ // kexec_file_load, They likely need new NORM_* types. Also, these suggest
624
+ // that NORM_WHAT_ may need some new types.
622
625
switch (objtype )
623
626
{
624
627
case NORM_FILE :
@@ -778,7 +781,7 @@ static int normalize_syscall(auparse_state_t *au, const char *syscall)
778
781
case NORM_MAC_LOAD :
779
782
act = normalize_record_map_i2s (ttype );
780
783
// FIXME: What is the object?
781
- D .thing .what = NORM_WHAT_MAC_CONFIG ;
784
+ D .thing .what = NORM_WHAT_SECURITY_POLICY ;
782
785
break ;
783
786
case NORM_MAC_CONFIG :
784
787
act = normalize_record_map_i2s (ttype );
@@ -789,7 +792,7 @@ static int normalize_syscall(auparse_state_t *au, const char *syscall)
789
792
D .thing .primary = set_field (D .thing .primary ,
790
793
auparse_get_field_num (au ));
791
794
}
792
- D .thing .what = NORM_WHAT_MAC_CONFIG ;
795
+ D .thing .what = NORM_WHAT_SECURITY_POLICY ;
793
796
break ;
794
797
case NORM_MAC_ENFORCE :
795
798
act = normalize_record_map_i2s (ttype );
@@ -800,7 +803,7 @@ static int normalize_syscall(auparse_state_t *au, const char *syscall)
800
803
D .thing .primary = set_field (D .thing .primary ,
801
804
auparse_get_field_num (au ));
802
805
}
803
- D .thing .what = NORM_WHAT_MAC_CONFIG ;
806
+ D .thing .what = NORM_WHAT_SECURITY_POLICY ;
804
807
break ;
805
808
case NORM_MAC_ERR :
806
809
// FIXME: What could the object be?
@@ -1109,7 +1112,10 @@ static int normalize_compound(auparse_state_t *au)
1109
1112
1110
1113
otype = type = auparse_get_type (au );
1111
1114
1112
- // All compound events have a syscall record, find it
1115
+ // All compound events have a syscall record, find it. After this
1116
+ // loop, type should be syscall, and otype is the original type.
1117
+ // Traditionally, the first record is the purpose of the event and
1118
+ // the syscall is added on next to support/enhance information content.
1113
1119
if (type != AUDIT_SYSCALL ) {
1114
1120
do {
1115
1121
// If we go off the end without finding a syscall
@@ -1359,17 +1365,17 @@ static value_t find_simple_object(auparse_state_t *au, int type)
1359
1365
break ;
1360
1366
case AUDIT_MAC_CONFIG_CHANGE :
1361
1367
f = auparse_find_field (au , "bool" );
1362
- D .thing .what = NORM_WHAT_MAC_CONFIG ;
1368
+ D .thing .what = NORM_WHAT_SECURITY_POLICY ;
1363
1369
break ;
1364
1370
case AUDIT_MAC_STATUS :
1365
1371
f = auparse_find_field (au , "enforcing" );
1366
- D .thing .what = NORM_WHAT_MAC_CONFIG ;
1372
+ D .thing .what = NORM_WHAT_SECURITY_POLICY ;
1367
1373
break ;
1368
1374
// These deal with policy, not sure about object yet
1369
1375
case AUDIT_MAC_POLICY_LOAD :
1370
1376
case AUDIT_LABEL_OVERRIDE :
1371
1377
case AUDIT_DEV_ALLOC ... AUDIT_USER_MAC_CONFIG_CHANGE :
1372
- D .thing .what = NORM_WHAT_MAC_CONFIG ;
1378
+ D .thing .what = NORM_WHAT_SECURITY_POLICY ;
1373
1379
break ;
1374
1380
case AUDIT_USER :
1375
1381
f = auparse_find_field (au , "addr" );
@@ -1861,7 +1867,7 @@ static int normalize_simple(auparse_state_t *au)
1861
1867
}
1862
1868
1863
1869
// Object type
1864
- D .thing .what = NORM_WHAT_MAC_CONFIG ;
1870
+ D .thing .what = NORM_WHAT_SECURITY_POLICY ;
1865
1871
1866
1872
// Results
1867
1873
set_results (au , 0 );
0 commit comments