audit.h (184858) | audit.h (186822) |
---|---|
1/*- 2 * Copyright (c) 1999-2005 Apple Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 25 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 26 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 * POSSIBILITY OF SUCH DAMAGE. 28 * | 1/*- 2 * Copyright (c) 1999-2005 Apple Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 25 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 26 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 * POSSIBILITY OF SUCH DAMAGE. 28 * |
29 * $FreeBSD: head/sys/security/audit/audit.h 184858 2008-11-11 23:08:20Z rwatson $ | 29 * $FreeBSD: head/sys/security/audit/audit.h 186822 2009-01-06 13:59:59Z rwatson $ |
30 */ 31 32/* 33 * This header includes function prototypes and type definitions that are 34 * necessary for the kernel as a whole to interact with the audit subsystem. 35 */ 36 37#ifndef _SECURITY_AUDIT_KERNEL_H_ --- 155 unchanged lines hidden (view full) --- 193#define AUDIT_SYSCALL_ENTER(code, td) do { \ 194 if (audit_enabled) { \ 195 audit_syscall_enter(code, td); \ 196 } \ 197} while (0) 198 199/* 200 * Wrap the audit_syscall_exit() function so that it is called only when | 30 */ 31 32/* 33 * This header includes function prototypes and type definitions that are 34 * necessary for the kernel as a whole to interact with the audit subsystem. 35 */ 36 37#ifndef _SECURITY_AUDIT_KERNEL_H_ --- 155 unchanged lines hidden (view full) --- 193#define AUDIT_SYSCALL_ENTER(code, td) do { \ 194 if (audit_enabled) { \ 195 audit_syscall_enter(code, td); \ 196 } \ 197} while (0) 198 199/* 200 * Wrap the audit_syscall_exit() function so that it is called only when |
201 * auditing is enabled, or we have a audit record on the thread. It is 202 * possible that an audit record was begun before auditing was turned off. | 201 * we have a audit record on the thread. Audit records can persist after 202 * auditing is disabled, so we don't just check audit_enabled here. |
203 */ 204#define AUDIT_SYSCALL_EXIT(error, td) do { \ | 203 */ 204#define AUDIT_SYSCALL_EXIT(error, td) do { \ |
205 if (audit_enabled || (td->td_ar != NULL)) \ | 205 if (td->td_ar != NULL) \ |
206 audit_syscall_exit(error, td); \ 207} while (0) 208 209/* 210 * A Macro to wrap the audit_sysclose() function. 211 */ 212#define AUDIT_SYSCLOSE(td, fd) do { \ 213 if (audit_enabled) \ --- 20 unchanged lines hidden --- | 206 audit_syscall_exit(error, td); \ 207} while (0) 208 209/* 210 * A Macro to wrap the audit_sysclose() function. 211 */ 212#define AUDIT_SYSCLOSE(td, fd) do { \ 213 if (audit_enabled) \ --- 20 unchanged lines hidden --- |