freebsd-dev/sys/security/audit
Robert Watson 2ddefb6d5d Rework the logic around quick checks for auditing that take place at
system-call entry and whenever audit arguments or return values are
captured:

1. Expose a single global, audit_syscalls_enabled, which controls
   whether the audit framework is entered, rather than exposing
   components of the policy -- e.g., if the trail is enabled,
   suspended, etc.

2. Introduce a new function audit_syscalls_enabled_update(), which is
   called to update audit_syscalls_enabled whenever an aspect of the
   policy changes, so that the value can be updated.

3. Remove a check of trail enablement/suspension from audit_new() --
   at the point where this function has been entered, we believe that
   system-call auditing is already in force, or we wouldn't get here,
   so simply proceed to more expensive policy checks.

4. Use an audit-provided global, audit_dtrace_enabled, rather than a
   dtaudit-provided global, to provide policy indicating whether
   dtaudit would like system calls to be audited.

5. Do some minor cosmetic renaming to clarify what various variables
   are for.

These changes collectively arrange it so that traditional audit
(trail, pipes) or the DTrace audit provider can enable system-call
probes without the other configured.  Otherwise, dtaudit cannot
capture system-call data without auditd(8) started.

Reviewed by:		gnn
Sponsored by:		DARPA, AFRL
Approved by:		re (gjb)
Differential Revision:	https://reviews.freebsd.org/D17348
2018-10-02 15:58:17 +00:00
..
audit_arg.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
audit_bsm_db.c The kernel DTrace audit provider (dtaudit) relies on auditd(8) to load 2018-09-03 14:26:43 +00:00
audit_bsm_klib.c audit(4): fix a typo in a comment 2018-03-17 17:56:08 +00:00
audit_bsm.c Fix audit of chflagsat, lgetfh, and setfib 2018-07-22 14:11:52 +00:00
audit_dtrace.c Rework the logic around quick checks for auditing that take place at 2018-10-02 15:58:17 +00:00
audit_ioctl.h #include <bsm/audit.h> in security/audit/audit_ioctl.h 2018-05-30 21:50:23 +00:00
audit_pipe.c fix incorrect operator in the AUDITPIPE_SET_QLIMIT bounds check 2018-07-23 16:56:49 +00:00
audit_private.h Rework the logic around quick checks for auditing that take place at 2018-10-02 15:58:17 +00:00
audit_syscalls.c Rework the logic around quick checks for auditing that take place at 2018-10-02 15:58:17 +00:00
audit_trigger.c
audit_worker.c Rework the logic around quick checks for auditing that take place at 2018-10-02 15:58:17 +00:00
audit.c Rework the logic around quick checks for auditing that take place at 2018-10-02 15:58:17 +00:00
audit.h Rework the logic around quick checks for auditing that take place at 2018-10-02 15:58:17 +00:00
bsm_domain.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
bsm_errno.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
bsm_fcntl.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
bsm_socket_type.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
bsm_token.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00