Deleted Added
full compact
audit_syscalls.c (161813) audit_syscalls.c (162380)
1/*
2 * Copyright (c) 1999-2005 Apple Computer, 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 Computer, 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_syscalls.c 161813 2006-09-01 11:45:40Z wsalamon $
29 * $FreeBSD: head/sys/security/audit/audit_syscalls.c 162380 2006-09-17 17:52:57Z csjp $
30 */
31
32#include <sys/param.h>
33#include <sys/mount.h>
34#include <sys/namei.h>
35#include <sys/proc.h>
36#include <sys/sysproto.h>
37#include <sys/systm.h>

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

113 * record along with the record for this audit event.
114 *
115 * XXXAUDIT: KASSERT appropriate starting values of k_udata, k_ulen,
116 * k_ar_commit & AR_COMMIT_USER?
117 */
118 ar->k_udata = rec;
119 ar->k_ulen = uap->length;
120 ar->k_ar_commit |= AR_COMMIT_USER;
30 */
31
32#include <sys/param.h>
33#include <sys/mount.h>
34#include <sys/namei.h>
35#include <sys/proc.h>
36#include <sys/sysproto.h>
37#include <sys/systm.h>

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

113 * record along with the record for this audit event.
114 *
115 * XXXAUDIT: KASSERT appropriate starting values of k_udata, k_ulen,
116 * k_ar_commit & AR_COMMIT_USER?
117 */
118 ar->k_udata = rec;
119 ar->k_ulen = uap->length;
120 ar->k_ar_commit |= AR_COMMIT_USER;
121
122 /*
123 * Currently we assume that all preselection has been performed in
124 * userspace. We unconditionally set these masks so that the records
125 * get committed both to the trail and pipe. In the future we will
126 * want to setup kernel based preselection.
127 */
128 ar->k_ar_commit |= (AR_PRESELECT_USER_TRAIL | AR_PRESELECT_USER_PIPE);
121 return (0);
122
123free_out:
124 /*
125 * audit_syscall_exit() will free the audit record on the thread even
126 * if we allocated it above.
127 */
128 free(rec, M_AUDITDATA);

--- 534 unchanged lines hidden ---
129 return (0);
130
131free_out:
132 /*
133 * audit_syscall_exit() will free the audit record on the thread even
134 * if we allocated it above.
135 */
136 free(rec, M_AUDITDATA);

--- 534 unchanged lines hidden ---