1159248Srwatson/*- 2159248Srwatson * Copyright (c) 2006 Robert N. M. Watson 3159248Srwatson * All rights reserved. 4159248Srwatson * 5159248Srwatson * This software was developed by Robert Watson for the TrustedBSD Project. 6159248Srwatson * 7159248Srwatson * Redistribution and use in source and binary forms, with or without 8159248Srwatson * modification, are permitted provided that the following conditions 9159248Srwatson * are met: 10159248Srwatson * 1. Redistributions of source code must retain the above copyright 11159248Srwatson * notice, this list of conditions and the following disclaimer. 12159248Srwatson * 2. Redistributions in binary form must reproduce the above copyright 13159248Srwatson * notice, this list of conditions and the following disclaimer in the 14159248Srwatson * documentation and/or other materials provided with the distribution. 15159248Srwatson * 16159248Srwatson * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17159248Srwatson * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18159248Srwatson * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19159248Srwatson * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 20159248Srwatson * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21159248Srwatson * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22159248Srwatson * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23159248Srwatson * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24159248Srwatson * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25159248Srwatson * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26159248Srwatson * SUCH DAMAGE. 27159248Srwatson * 28185573Srwatson * $P4: //depot/projects/trustedbsd/openbsm/modules/auditfilter_noop/auditfilter_noop.c#6 $ 29159248Srwatson */ 30159248Srwatson 31159248Srwatson/* 32159248Srwatson * Sample audit filter: no-op which sinks audit records in both BSM and 33159248Srwatson * parsed formats, but does nothing with them. 34159248Srwatson */ 35159248Srwatson 36159248Srwatson#include <bsm/libbsm.h> 37159248Srwatson 38159248Srwatson#include <bsm/libbsm.h> 39159248Srwatson#include <bsm/audit_filter.h> 40159248Srwatson 41185573Srwatson#ifndef __unused 42185573Srwatson#define __unused 43185573Srwatson#endif 44185573Srwatson 45159248Srwatsonint 46185573SrwatsonAUDIT_FILTER_ATTACH(void *instance __unused, int argc __unused, 47185573Srwatson char *argv[] __unused) 48159248Srwatson{ 49159248Srwatson 50159248Srwatson return (0); 51159248Srwatson} 52159248Srwatson 53159248Srwatsonint 54185573SrwatsonAUDIT_FILTER_REINIT(void *instance __unused, int argc __unused, 55185573Srwatson char *argv[] __unused) 56159248Srwatson{ 57159248Srwatson 58159248Srwatson return (0); 59159248Srwatson} 60159248Srwatson 61159248Srwatsonvoid 62185573SrwatsonAUDIT_FILTER_RECORD(void *instance __unused, struct timespec *ts __unused, 63185573Srwatson int token_count __unused, const tokenstr_t *tok[] __unused) 64159248Srwatson{ 65159248Srwatson 66159248Srwatson} 67159248Srwatson 68159248Srwatsonvoid 69185573SrwatsonAUDIT_FILTER_RAWRECORD(void *instance __unused, struct timespec *ts __unused, 70185573Srwatson u_char *data __unused, u_int len __unused) 71159248Srwatson{ 72159248Srwatson 73159248Srwatson} 74159248Srwatson 75159248Srwatsonvoid 76185573SrwatsonAUDIT_FILTER_DETACH(void *instance __unused) 77159248Srwatson{ 78159248Srwatson 79159248Srwatson} 80