Deleted Added
full compact
audit.c (162176) audit.c (162380)
1/*
2 * Copyright (c) 1999-2005 Apple Computer, Inc.
3 * Copyright (c) 2006 Robert N. M. Watson
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

22 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGE.
29 *
1/*
2 * Copyright (c) 1999-2005 Apple Computer, Inc.
3 * Copyright (c) 2006 Robert N. M. Watson
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

22 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGE.
29 *
30 * $FreeBSD: head/sys/security/audit/audit.c 162176 2006-09-09 10:23:00Z rwatson $
30 * $FreeBSD: head/sys/security/audit/audit.c 162380 2006-09-17 17:52:57Z csjp $
31 */
32
33#include <sys/param.h>
34#include <sys/condvar.h>
35#include <sys/conf.h>
36#include <sys/file.h>
37#include <sys/filedesc.h>
38#include <sys/fcntl.h>

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

391 class = au_event_class(event);
392
393 ar->k_ar_commit |= AR_COMMIT_KERNEL;
394 if (au_preselect(event, class, aumask, sorf) != 0)
395 ar->k_ar_commit |= AR_PRESELECT_TRAIL;
396 if (audit_pipe_preselect(auid, event, class, sorf,
397 ar->k_ar_commit & AR_PRESELECT_TRAIL) != 0)
398 ar->k_ar_commit |= AR_PRESELECT_PIPE;
31 */
32
33#include <sys/param.h>
34#include <sys/condvar.h>
35#include <sys/conf.h>
36#include <sys/file.h>
37#include <sys/filedesc.h>
38#include <sys/fcntl.h>

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

391 class = au_event_class(event);
392
393 ar->k_ar_commit |= AR_COMMIT_KERNEL;
394 if (au_preselect(event, class, aumask, sorf) != 0)
395 ar->k_ar_commit |= AR_PRESELECT_TRAIL;
396 if (audit_pipe_preselect(auid, event, class, sorf,
397 ar->k_ar_commit & AR_PRESELECT_TRAIL) != 0)
398 ar->k_ar_commit |= AR_PRESELECT_PIPE;
399 if ((ar->k_ar_commit & (AR_PRESELECT_TRAIL | AR_PRESELECT_PIPE)) ==
400 0) {
399 if ((ar->k_ar_commit & (AR_PRESELECT_TRAIL | AR_PRESELECT_PIPE |
400 AR_PRESELECT_USER_TRAIL | AR_PRESELECT_USER_PIPE)) == 0) {
401 mtx_lock(&audit_mtx);
402 audit_pre_q_len--;
403 mtx_unlock(&audit_mtx);
404 audit_free(ar);
405 return;
406 }
407
408 ar->k_ar.ar_errno = error;

--- 248 unchanged lines hidden ---
401 mtx_lock(&audit_mtx);
402 audit_pre_q_len--;
403 mtx_unlock(&audit_mtx);
404 audit_free(ar);
405 return;
406 }
407
408 ar->k_ar.ar_errno = error;

--- 248 unchanged lines hidden ---