opnsense-src/sys/security
Mark Johnston f78fe93085 audit: Fix short-circuiting in syscallenter()
syscallenter() has a slow path to handle syscall auditing and dtrace
syscall tracing.  It uses AUDIT_SYSCALL_ENTER() to check whether to take
the slow path, but this macro also has side effects: it writes the audit
log entry.  When systrace (dtrace syscall tracing) is enabled, this
would get short-circuited, and we end up not writing audit log entries.

Introduce a pure macro to check whether auditing is enabled, use it in
syscallenter() instead of AUDIT_SYSCALL_ENTER().

Reviewed by:	kib
Reported by:	Joe Duin <jd@firexfly.com>
Fixes:		2f7292437d ("Merge audit and systrace checks")
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D48448
2025-01-14 14:19:28 +00:00
..
audit audit: Fix short-circuiting in syscallenter() 2025-01-14 14:19:28 +00:00
mac New setcred() system call and associated MAC hooks 2024-12-16 15:42:39 +01:00
mac_biba MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2024-12-16 15:42:28 +01:00
mac_bsdextended MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2024-12-16 15:42:28 +01:00
mac_ddb mac_ddb: Fix the show rman validator. 2022-08-12 10:20:05 -07:00
mac_do MAC/do: Fix a compilation warning about an unused function 2024-12-17 15:47:42 +01:00
mac_grantbylabel MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2024-12-16 15:42:28 +01:00
mac_ifoff MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2024-12-16 15:42:28 +01:00
mac_ipacl MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2024-12-16 15:42:28 +01:00
mac_lomac MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2024-12-16 15:42:28 +01:00
mac_mls MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2024-12-16 15:42:28 +01:00
mac_none sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
mac_ntpd MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2024-12-16 15:42:28 +01:00
mac_partition MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2024-12-16 15:42:28 +01:00
mac_pimd MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2024-12-16 15:42:28 +01:00
mac_portacl MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2024-12-16 15:42:28 +01:00
mac_priority MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2024-12-16 15:42:28 +01:00
mac_seeotheruids MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2024-12-16 15:42:28 +01:00
mac_stub New setcred() system call and associated MAC hooks 2024-12-16 15:42:39 +01:00
mac_test New setcred() system call and associated MAC hooks 2024-12-16 15:42:39 +01:00
mac_veriexec MAC: mac_policy.h: Declare common MAC sysctl and jail parameters' nodes 2024-12-16 15:42:28 +01:00
mac_veriexec_parser mac_veriexec_parser: Fix open_file error handling 2024-09-20 09:22:56 -06:00