Deleted Added
full compact
audit_worker.c (178186) audit_worker.c (179176)
1/*
2 * Copyright (c) 1999-2005 Apple Computer, Inc.
3 * Copyright (c) 2006-2008 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:

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

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
31#include <sys/cdefs.h>
1/*
2 * Copyright (c) 1999-2005 Apple Computer, Inc.
3 * Copyright (c) 2006-2008 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:

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

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
31#include <sys/cdefs.h>
32__FBSDID("$FreeBSD: head/sys/security/audit/audit_worker.c 178186 2008-04-13 22:06:56Z rwatson $");
32__FBSDID("$FreeBSD: head/sys/security/audit/audit_worker.c 179176 2008-05-21 13:05:06Z rwatson $");
33
34#include <sys/param.h>
35#include <sys/condvar.h>
36#include <sys/conf.h>
37#include <sys/file.h>
38#include <sys/filedesc.h>
39#include <sys/fcntl.h>
40#include <sys/ipc.h>

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

237 * true, since audit_in_failure can only be set of audit_fail_stop is
238 * set.
239 *
240 * Note: if we handle recovery from audit_in_failure, then we need to
241 * make panic here conditional.
242 */
243 if (audit_in_failure) {
244 if (audit_q_len == 0 && audit_pre_q_len == 0) {
33
34#include <sys/param.h>
35#include <sys/condvar.h>
36#include <sys/conf.h>
37#include <sys/file.h>
38#include <sys/filedesc.h>
39#include <sys/fcntl.h>
40#include <sys/ipc.h>

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

237 * true, since audit_in_failure can only be set of audit_fail_stop is
238 * set.
239 *
240 * Note: if we handle recovery from audit_in_failure, then we need to
241 * make panic here conditional.
242 */
243 if (audit_in_failure) {
244 if (audit_q_len == 0 && audit_pre_q_len == 0) {
245 VOP_LOCK(vp, LK_DRAIN | LK_INTERLOCK);
245 VOP_LOCK(vp, LK_EXCLUSIVE | LK_RETRY);
246 (void)VOP_FSYNC(vp, MNT_WAIT, curthread);
247 VOP_UNLOCK(vp, 0);
248 panic("Audit store overflow; record queue drained.");
249 }
250 }
251
252 VFS_UNLOCK_GIANT(vfslocked);
253 return;

--- 232 unchanged lines hidden ---
246 (void)VOP_FSYNC(vp, MNT_WAIT, curthread);
247 VOP_UNLOCK(vp, 0);
248 panic("Audit store overflow; record queue drained.");
249 }
250 }
251
252 VFS_UNLOCK_GIANT(vfslocked);
253 return;

--- 232 unchanged lines hidden ---