Skip to content

Commit 8fdfe53

Browse files
committed
Use process group when more than 1 object
1 parent 2f329f4 commit 8fdfe53

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

auparse/normalize-internal.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
#define NORM_WHAT_SOFTWARE 23
105105
#define NORM_WHAT_INTEGRITY_POLICY 24
106106
#define NORM_WHAT_SECURITY_MODULES 25
107+
#define NORM_WHAT_PROCESS_GROUP 26
107108

108109
// This enum is used to map events to what kind they are
109110
#define NORM_EVTYPE_UNKNOWN 0

auparse/normalize.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -779,11 +779,14 @@ static int normalize_syscall(auparse_state_t *au, const char *syscall)
779779
set_socket_object(au);
780780
break;
781781
case NORM_PID:
782-
if (auparse_get_num_records(au) > 2)
782+
if (auparse_get_num_records(au) > 2) {
783783
// FIXME: this has implications for object
784784
act = "killed-list-of-pids";
785-
else
785+
D.thing.what = NORM_WHAT_PROCESS_GROUP;
786+
} else {
786787
act = "killed-pid";
788+
D.thing.what = NORM_WHAT_PROCESS;
789+
}
787790
auparse_goto_record_num(au, 1);
788791
auparse_first_field(au);
789792
f = auparse_find_field(au, "saddr");
@@ -793,7 +796,6 @@ static int normalize_syscall(auparse_state_t *au, const char *syscall)
793796
D.thing.primary = set_field(D.thing.primary,
794797
auparse_get_field_num(au));
795798
}
796-
D.thing.what = NORM_WHAT_PROCESS;
797799
break;
798800
case NORM_MAC_LOAD:
799801
act = normalize_record_map_i2s(ttype);

auparse/normalize_obj_kind_map.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,5 @@ _S(NORM_WHAT_DEVICE, "device")
4848
_S(NORM_WHAT_SOFTWARE, "software")
4949
_S(NORM_WHAT_INTEGRITY_POLICY, "integrity-policy")
5050
_S(NORM_WHAT_SECURITY_MODULES, "security-modules")
51+
_S(NORM_WHAT_PROCESS_GROUP, "process-group")
5152
//_S(, "")

0 commit comments

Comments
 (0)