Date: Sat, 30 Jul 2016 00:00:11 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r419287 - head/security/bsmtrace/files Message-ID: <201607300000.u6U00BnK034555@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Sat Jul 30 00:00:11 2016 New Revision: 419287 URL: https://svnweb.freebsd.org/changeset/ports/419287 Log: Prevent collision with dprintf(3) Added: head/security/bsmtrace/files/patch-bsm.c (contents, props changed) head/security/bsmtrace/files/patch-bsmtrace.c (contents, props changed) head/security/bsmtrace/files/patch-bsmtrace.h (contents, props changed) head/security/bsmtrace/files/patch-trigger.c (contents, props changed) Added: head/security/bsmtrace/files/patch-bsm.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/bsmtrace/files/patch-bsm.c Sat Jul 30 00:00:11 2016 (r419287) @@ -0,0 +1,56 @@ +--- bsm.c.orig 2014-01-14 22:51:19 UTC ++++ bsm.c +@@ -330,7 +330,7 @@ bsm_copy_states(struct bsm_sequence *bs_ + * Make sure that we initialize the new tailq head to NULL + * otherwise we would be recursively adding states. + */ +- dprintf("%s: copying states from sequence %p\n", __func__, bs_old); ++ d_printf("%s: copying states from sequence %p\n", __func__, bs_old); + TAILQ_INIT(&bs_new->bs_mhead); + TAILQ_FOREACH(bm, &bs_old->bs_mhead, bm_glue) { + bm2 = calloc(1, sizeof(*bm2)); +@@ -361,7 +361,7 @@ bsm_free_sequence(struct bsm_sequence *b + { + struct bsm_state *bm; + +- dprintf("%s: freeing sequence %p\n", __func__, bs); ++ d_printf("%s: freeing sequence %p\n", __func__, bs); + assert((bs->bs_seq_flags & BSM_SEQUENCE_DYNAMIC) != 0); + bsm_free_raw_data(bs); + while (!TAILQ_EMPTY(&bs->bs_mhead)) { +@@ -421,7 +421,7 @@ bsm_sequence_clone(struct bsm_sequence * + bsmtrace_error(0, "%s: calloc failed", __func__); + return (NULL); + } +- dprintf("%u:%s: sequence %p cloned and linked\n", ++ d_printf("%u:%s: sequence %p cloned and linked\n", + time(NULL), bs->bs_label, bs_new); + *bs_new = *bs; + /* +@@ -506,7 +506,7 @@ bsm_sequence_scan(struct bsm_record_data + bs->bs_seq_flags |= BSM_SEQUENCE_DESTROY; + continue; + } +- dprintf("%s: state transition cur=%p\n", bs->bs_label, ++ d_printf("%s: state transition cur=%p\n", bs->bs_label, + TAILQ_NEXT(bm, bm_glue)); + bs->bs_cur_state = TAILQ_NEXT(bm, bm_glue); + } +@@ -529,7 +529,7 @@ bsm_sequence_scan(struct bsm_record_data + bsm_log_sequence(bs, bd); + continue; + } +- dprintf("%d:%s: state transition\n", time(NULL), bs->bs_label); ++ d_printf("%d:%s: state transition\n", time(NULL), bs->bs_label); + subj = bsm_get_subj(bs, bd); + bs_dyn = bsm_sequence_clone(bs, subj, bd); + if (bs_dyn == NULL) +@@ -555,7 +555,7 @@ bsm_loop(char *atrail) + bsmtrace_error(1, "%s: %s", opts.aflag, strerror(errno)); + if (strcmp(opts.aflag, DEFAULT_AUDIT_TRAIL) == 0) + audit_pipe_fd = fileno(fp); +- dprintf("opened '%s' for audit monitoring\n", opts.aflag); ++ d_printf("opened '%s' for audit monitoring\n", opts.aflag); + /* + * Process the BSM record, one token at a time. + */ Added: head/security/bsmtrace/files/patch-bsmtrace.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/bsmtrace/files/patch-bsmtrace.c Sat Jul 30 00:00:11 2016 (r419287) @@ -0,0 +1,11 @@ +--- bsmtrace.c.orig 2014-01-14 22:51:19 UTC ++++ bsmtrace.c +@@ -92,7 +92,7 @@ bsmtrace_exit(int x) + } + + void +-dprintf(char *fmt, ...) ++d_printf(char *fmt, ...) + { + char buf[1024]; + va_list ap; Added: head/security/bsmtrace/files/patch-bsmtrace.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/bsmtrace/files/patch-bsmtrace.h Sat Jul 30 00:00:11 2016 (r419287) @@ -0,0 +1,10 @@ +--- bsmtrace.h.orig 2014-02-05 02:34:38 UTC ++++ bsmtrace.h +@@ -43,6 +43,6 @@ int audit_pipe_fd; /* XXX not happy abou + + void bsmtrace_error(int, char *, ...); + void bsmtrace_exit(int); +-void dprintf(char *, ...); ++void d_printf(char *, ...); + void usage(char *); + #endif /* BSM_TRACE_H_ */ Added: head/security/bsmtrace/files/patch-trigger.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/bsmtrace/files/patch-trigger.c Sat Jul 30 00:00:11 2016 (r419287) @@ -0,0 +1,11 @@ +--- trigger.c.orig 2014-01-14 22:51:19 UTC ++++ trigger.c +@@ -135,7 +135,7 @@ bsm_run_trigger(struct bsm_record_data * + if (args == NULL) + bsmtrace_error(1, "%s: calloc failed", + __func__); +- dprintf("executing trigger: '%s'\n", cmd); ++ d_printf("executing trigger: '%s'\n", cmd); + while ((ptr = strsep(&cmd, " ")) != NULL) { + if (*ptr == '\0') + continue;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607300000.u6U00BnK034555>