diff options
author | Marek Pospisil <Marek.Pospisil@Sun.COM> | 2010-03-05 13:16:08 -0800 |
---|---|---|
committer | Marek Pospisil <Marek.Pospisil@Sun.COM> | 2010-03-05 13:16:08 -0800 |
commit | 005d3feb53a9a10272d4a24b03991575d6a9bcb3 (patch) | |
tree | 3c239c5ec7be3de4c1719c4539033149da56a799 /usr/src/uts/common/c2/audit_mem.c | |
parent | 83d7a2524bdbf7b1da1c47b52bc20eee0f12c60e (diff) | |
download | illumos-joyent-005d3feb53a9a10272d4a24b03991575d6a9bcb3.tar.gz |
PSARC/2009/354 Always on / no reboot Solaris Audit
6192139 Solaris auditing should be able to start collecting audit records without a reboot
Diffstat (limited to 'usr/src/uts/common/c2/audit_mem.c')
-rw-r--r-- | usr/src/uts/common/c2/audit_mem.c | 39 |
1 files changed, 5 insertions, 34 deletions
diff --git a/usr/src/uts/common/c2/audit_mem.c b/usr/src/uts/common/c2/audit_mem.c index 7e88f2dd5e..9782324d6f 100644 --- a/usr/src/uts/common/c2/audit_mem.c +++ b/usr/src/uts/common/c2/audit_mem.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <sys/param.h> #include <sys/types.h> #include <sys/kmem.h> @@ -36,8 +33,6 @@ #include <c2/audit_kernel.h> #include <c2/audit_record.h> -kmem_cache_t *au_pad_cache; - static kmem_cache_t *au_buf_cache; /* @@ -162,7 +157,7 @@ au_append_buf(const char *data, int len, au_buff_t *buf) buf = buf->next_buf; new_len = (uint_t)(buf->len + len) > AU_BUFSIZE ? - AU_BUFSIZE - buf->len : len; + AU_BUFSIZE - buf->len : len; bcopy(data, (buf->buf + buf->len), (uint_t)new_len); buf->len += (uchar_t)new_len; len -= new_len; @@ -182,33 +177,9 @@ au_append_buf(const char *data, int len, au_buff_t *buf) return (0); } -/*ARGSUSED1*/ -static int -au_pad_const(void *vpad, void *priv, int flags) -{ - p_audit_data_t *pad = vpad; - - mutex_init(&pad->pad_lock, NULL, MUTEX_DEFAULT, NULL); - - return (0); -} - -/*ARGSUSED1*/ -static void -au_pad_destr(void *vpad, void *priv) -{ - p_audit_data_t *pad = vpad; - - mutex_destroy(&pad->pad_lock); -} - void au_mem_init() { au_buf_cache = kmem_cache_create("audit_buffer", - sizeof (au_buff_t), 0, NULL, NULL, NULL, NULL, NULL, 0); - - au_pad_cache = kmem_cache_create("audit_proc", - sizeof (p_audit_data_t), 0, au_pad_const, au_pad_destr, - NULL, NULL, NULL, 0); + sizeof (au_buff_t), 0, NULL, NULL, NULL, NULL, NULL, 0); } |