diff options
author | Richard Guy Briggs <rgb@redhat.com> | 2018-02-14 21:47:43 -0500 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2018-02-15 14:36:29 -0500 |
commit | 5260ecc2e0480cc7e184901ab4c3721d0c2765e3 (patch) | |
tree | 42ad7e5a7cf607997d5bfae0654f21d7557c1ceb /kernel/auditsc.c | |
parent | 6387440e15db1c9ee58028433cd87291cae488e7 (diff) |
audit: deprecate the AUDIT_FILTER_ENTRY filter
The audit entry filter has been long deprecated with userspace support
finally removed in audit-v2.6.7 and plans to remove kernel support have
existed since kernel-v2.6.31.
Remove it.
Since removing the audit entry filter, test for early return before
setting up any context state.
Passes audit-testsuite.
See: https://github.com/linux-audit/audit-kernel/issues/6
Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r-- | kernel/auditsc.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index e80459f7e132..bc534bfb49a4 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -1519,22 +1519,23 @@ void __audit_syscall_entry(int major, unsigned long a1, unsigned long a2, | |||
1519 | if (!audit_enabled) | 1519 | if (!audit_enabled) |
1520 | return; | 1520 | return; |
1521 | 1521 | ||
1522 | context->arch = syscall_get_arch(); | ||
1523 | context->major = major; | ||
1524 | context->argv[0] = a1; | ||
1525 | context->argv[1] = a2; | ||
1526 | context->argv[2] = a3; | ||
1527 | context->argv[3] = a4; | ||
1528 | |||
1529 | state = context->state; | 1522 | state = context->state; |
1523 | if (state == AUDIT_DISABLED) | ||
1524 | return; | ||
1525 | |||
1530 | context->dummy = !audit_n_rules; | 1526 | context->dummy = !audit_n_rules; |
1531 | if (!context->dummy && state == AUDIT_BUILD_CONTEXT) { | 1527 | if (!context->dummy && state == AUDIT_BUILD_CONTEXT) { |
1532 | context->prio = 0; | 1528 | context->prio = 0; |
1533 | state = audit_filter_syscall(tsk, context, &audit_filter_list[AUDIT_FILTER_ENTRY]); | 1529 | if (auditd_test_task(tsk)) |
1530 | return; | ||
1534 | } | 1531 | } |
1535 | if (state == AUDIT_DISABLED) | ||
1536 | return; | ||
1537 | 1532 | ||
1533 | context->arch = syscall_get_arch(); | ||
1534 | context->major = major; | ||
1535 | context->argv[0] = a1; | ||
1536 | context->argv[1] = a2; | ||
1537 | context->argv[2] = a3; | ||
1538 | context->argv[3] = a4; | ||
1538 | context->serial = 0; | 1539 | context->serial = 0; |
1539 | context->ctime = current_kernel_time64(); | 1540 | context->ctime = current_kernel_time64(); |
1540 | context->in_syscall = 1; | 1541 | context->in_syscall = 1; |