Skip to content

Commit 4758ec5

Browse files
In auparse_normalize, pick up comm for successful memory allocations
1 parent 0dc710a commit 4758ec5

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
- In audispd.conf, add new plugin_dir config item to customize plugin location
2828
- Add support for FANOTIFY event
2929
- Improve auparse_normalize support for SECCOMP events
30+
- In auparse_normalize, pick up comm for successful memory allocations
3031

3132
2.7.8
3233
- Add config option to auditd to not verify email addr domain (#1406887)

auparse/normalize.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,19 @@ static int normalize_syscall(auparse_state_t *au, const char *syscall)
806806
break;
807807
case NORM_SYSTEM_MEMORY:
808808
act = "allocated-memory";
809-
// TODO: The object is implied
809+
if (syscall_success == 1) {
810+
// If its not a mmap avc, we can use comm
811+
act = "allocated-memory-in";
812+
auparse_first_record(au);
813+
f = auparse_find_field(au, "comm");
814+
if (f) {
815+
D.thing.primary = set_record(0,
816+
auparse_get_record_num(au));
817+
D.thing.primary =
818+
set_field(D.thing.primary,
819+
auparse_get_field_num(au));
820+
}
821+
}
810822
D.thing.what = NORM_WHAT_MEMORY;
811823
break;
812824
case NORM_SCHEDULER:

0 commit comments

Comments
 (0)