Deleted Added
sdiff udiff text old ( 159143 ) new ( 159269 )
full compact
1/*
2 * Copyright (c) 1999-2005 Apple Computer, Inc.
3 * Copyright (c) 2005 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_bsm_klib.c 159269 2006-06-05 14:48:17Z rwatson $
31 */
32
33#include <sys/param.h>
34#include <sys/fcntl.h>
35#include <sys/filedesc.h>
36#include <sys/libkern.h>
37#include <sys/malloc.h>
38#include <sys/mount.h>

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

149 }
150}
151
152/*
153 * Check whether an event is aditable by comparing the mask of classes this
154 * event is part of against the given mask.
155 */
156int
157au_preselect(au_event_t event, au_class_t class, au_mask_t *mask_p, int sorf)
158{
159 au_class_t effmask = 0;
160
161 if (mask_p == NULL)
162 return (-1);
163
164 /*
165 * Perform the actual check of the masks against the event.
166 */
167 if (sorf & AU_PRS_SUCCESS)
168 effmask |= (mask_p->am_success & class);
169
170 if (sorf & AU_PRS_FAILURE)
171 effmask |= (mask_p->am_failure & class);
172
173 if (effmask)
174 return (1);
175 else
176 return (0);
177}
178
179/*

--- 366 unchanged lines hidden ---