From owner-p4-projects@FreeBSD.ORG Wed Aug 23 05:01:38 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DE47D16A4E5; Wed, 23 Aug 2006 05:01:37 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AAA4516A4DE for ; Wed, 23 Aug 2006 05:01:37 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 48F4943D4C for ; Wed, 23 Aug 2006 05:01:37 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k7N51bix000963 for ; Wed, 23 Aug 2006 05:01:37 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7N51ahr000960 for perforce@freebsd.org; Wed, 23 Aug 2006 05:01:36 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Wed, 23 Aug 2006 05:01:36 GMT Message-Id: <200608230501.k7N51ahr000960@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 104823 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Aug 2006 05:01:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=104823 Change 104823 by rwatson@rwatson_sesame on 2006/08/23 05:00:49 Don't encode the string "bsm" into the audit filter API, prefer the string "audit". Suggested by: Martin Englund Affected files ... .. //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd.c#7 edit .. //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd.h#4 edit .. //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd_conf.c#4 edit .. //depot/projects/trustedbsd/openbsm/bsm/audit_filter.h#3 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd.c#7 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd.c#6 $ + * $P4: //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd.c#7 $ */ #include @@ -106,13 +106,13 @@ * Present raw BSM to a set of registered and interested filters. */ static void -present_bsmrecord(struct timespec *ts, u_char *data, u_int len) +present_auditrecord(struct timespec *ts, u_char *data, u_int len) { struct auditfilter_module *am; TAILQ_FOREACH(am, &filter_list, am_list) { - if (am->am_bsmrecord != NULL) - (am->am_bsmrecord)(am->am_instance, ts, data, len); + if (am->am_auditrecord != NULL) + (am->am_auditrecord)(am->am_instance, ts, data, len); } } @@ -191,7 +191,7 @@ continue; if (clock_gettime(CLOCK_REALTIME, &ts) < 0) err(-1, "clock_gettime"); - present_bsmrecord(&ts, buf, reclen); + present_auditrecord(&ts, buf, reclen); present_tokens(&ts, buf, reclen); free(buf); } @@ -241,7 +241,7 @@ continue; if (clock_gettime(CLOCK_REALTIME, &ts) < 0) err(-1, "clock_gettime"); - present_bsmrecord(&ts, record, reclen); + present_auditrecord(&ts, record, reclen); present_tokens(&ts, record, reclen); } } ==== //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd.h#4 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd.h#3 $ + * $P4: //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd.h#4 $ */ #define AUDITFILTERD_CONFFILE "/etc/security/audit_filter" @@ -57,7 +57,7 @@ audit_filter_attach_t am_attach; audit_filter_reinit_t am_reinit; audit_filter_record_t am_record; - audit_filter_bsmrecord_t am_bsmrecord; + audit_filter_auditrecord_t am_auditrecord; audit_filter_detach_t am_detach; /* ==== //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd_conf.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd_conf.c#3 $ + * $P4: //depot/projects/trustedbsd/openbsm/bin/auditfilterd/auditfilterd_conf.c#4 $ */ /* @@ -149,8 +149,8 @@ am->am_attach = dlsym(am->am_dlhandle, AUDIT_FILTER_ATTACH_STRING); am->am_reinit = dlsym(am->am_dlhandle, AUDIT_FILTER_REINIT_STRING); am->am_record = dlsym(am->am_dlhandle, AUDIT_FILTER_RECORD_STRING); - am->am_bsmrecord = dlsym(am->am_dlhandle, - AUDIT_FILTER_BSMRECORD_STRING); + am->am_auditrecord = dlsym(am->am_dlhandle, + AUDIT_FILTER_AUDITRECORD_STRING); am->am_detach = dlsym(am->am_dlhandle, AUDIT_FILTER_DETACH_STRING); if (am->am_attach != NULL) { @@ -163,7 +163,7 @@ am->am_attach = NULL; am->am_reinit = NULL; am->am_record = NULL; - am->am_bsmrecord = NULL; + am->am_auditrecord = NULL; am->am_detach = NULL; return (-1); } ==== //depot/projects/trustedbsd/openbsm/bsm/audit_filter.h#3 (text+ko) ==== @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/bsm/audit_filter.h#2 $ + * $P4: //depot/projects/trustedbsd/openbsm/bsm/audit_filter.h#3 $ */ #ifndef _BSM_AUDIT_FILTER_H_ @@ -38,7 +38,7 @@ * audit_filter_reinit_t - arguments to module have changed * audit_filter_record_t - present parsed record to filter module, with * receipt time - * audit_filter_bsmrecord_t - present bsm format record to filter module, + * audit_filter_auditrecord_t - present BSM format record to filter module, * with receipt time * audit_filter_destach_t - filter module is being detached * @@ -49,7 +49,7 @@ typedef int (*audit_filter_reinit_t)(void *instance, int argc, char *argv[]); typedef void (*audit_filter_record_t)(void *instance, struct timespec *ts, int token_count, const tokenstr_t tok[]); -typedef void (*audit_filter_bsmrecord_t)(void *instance, struct timespec *ts, +typedef void (*audit_filter_auditrecord_t)(void *instance, struct timespec *ts, void *data, u_int len); typedef void (*audit_filter_detach_t)(void *instance); @@ -66,12 +66,12 @@ #define AUDIT_FILTER_ATTACH audit_filter_attach #define AUDIT_FILTER_REINIT audit_filter_reinit #define AUDIT_FILTER_RECORD audit_filter_record -#define AUDIT_FILTER_BSMRECORD audit_filter_bsmrecord +#define AUDIT_FILTER_AUDITRECORD audit_filter_auditrecord #define AUDIT_FILTER_DETACH audit_filter_detach #define AUDIT_FILTER_ATTACH_STRING "audit_filter_attach" #define AUDIT_FILTER_REINIT_STRING "audit_filter_reinit" #define AUDIT_FILTER_RECORD_STRING "audit_filter_record" -#define AUDIT_FILTER_BSMRECORD_STRING "audit_filter_bsmrecord" +#define AUDIT_FILTER_AUDITRECORD_STRING "audit_filter_auditrecord" #define AUDIT_FILTER_DETACH_STRING "audit_filter_detach" #endif /* !_BSM_AUDIT_FILTER_H_ */