Deleted Added
full compact
audit_bsm.c (180701) audit_bsm.c (180704)
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

--- 14 unchanged lines hidden (view full) ---

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
30#include <sys/cdefs.h>
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

--- 14 unchanged lines hidden (view full) ---

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
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/security/audit/audit_bsm.c 180701 2008-07-22 15:29:48Z rwatson $");
31__FBSDID("$FreeBSD: head/sys/security/audit/audit_bsm.c 180704 2008-07-22 15:54:10Z rwatson $");
32
33#include <sys/param.h>
34#include <sys/vnode.h>
35#include <sys/ipc.h>
36#include <sys/lock.h>
37#include <sys/malloc.h>
38#include <sys/mutex.h>
39#include <sys/socket.h>

--- 112 unchanged lines hidden (view full) ---

152 rec->used = 0;
153 rec->len = 0;
154 free(rec->data, M_AUDITBSM);
155 free(rec, M_AUDITBSM);
156}
157
158/*
159 * XXX: May want turn some (or all) of these macros into functions in order
32
33#include <sys/param.h>
34#include <sys/vnode.h>
35#include <sys/ipc.h>
36#include <sys/lock.h>
37#include <sys/malloc.h>
38#include <sys/mutex.h>
39#include <sys/socket.h>

--- 112 unchanged lines hidden (view full) ---

152 rec->used = 0;
153 rec->len = 0;
154 free(rec->data, M_AUDITBSM);
155 free(rec, M_AUDITBSM);
156}
157
158/*
159 * XXX: May want turn some (or all) of these macros into functions in order
160 * to reduce the generated code sized.
160 * to reduce the generated code size.
161 *
162 * XXXAUDIT: These macros assume that 'kar', 'ar', 'rec', and 'tok' in the
163 * caller are OK with this.
164 */
165#define UPATH1_TOKENS do { \
166 if (ARG_IS_VALID(kar, ARG_UPATH1)) { \
167 tok = au_to_path(ar->ar_arg_upath1); \
168 kau_write(rec, tok); \

--- 1289 unchanged lines hidden ---
161 *
162 * XXXAUDIT: These macros assume that 'kar', 'ar', 'rec', and 'tok' in the
163 * caller are OK with this.
164 */
165#define UPATH1_TOKENS do { \
166 if (ARG_IS_VALID(kar, ARG_UPATH1)) { \
167 tok = au_to_path(ar->ar_arg_upath1); \
168 kau_write(rec, tok); \

--- 1289 unchanged lines hidden ---