Skip to content

Commit 2f329f4

Browse files
committed
In auditctl, if rule only has perms, detect hardware to filter syscalls
1 parent 1006f10 commit 2f329f4

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
- Drop IPX header handling and require kernel 5.15 or later
77
- Resolved a number of FIXME's all over the code base
88
- Optimize ausearch/report log processing
9+
- In auditctl, if rule only has perms, detect hardware to filter syscalls
910

1011
4.1.1
1112
- Add libauplugin example program and improve its documentation

lib/libaudit.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1581,8 +1581,13 @@ static int audit_add_perm_syscalls(int perm, struct audit_rule_data *rule)
15811581
// arch declared, we leave the old behavior for backwards compatibility
15821582
// and just warn about performance.
15831583
if (_audit_elf == 0) {
1584-
audit_msg(LOG_INFO, "perm used without an arch is slower");
1585-
return 0;
1584+
int machine = audit_detect_machine();
1585+
if (machine < 0) {
1586+
audit_msg(LOG_INFO,
1587+
"perm used without an arch is slower");
1588+
return 0;
1589+
}
1590+
_audit_elf = audit_machine_to_elf(machine);
15861591
}
15871592

15881593
const int machine = audit_elf_to_machine(_audit_elf);

0 commit comments

Comments
 (0)