diff options
author | bapt <bapt@FreeBSD.org> | 2016-07-30 00:00:11 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2016-07-30 00:00:11 +0000 |
commit | d5a367a9d752505e83b5839cb08f1d16e19f0058 (patch) | |
tree | fbbc6b4d88e3c060be910b271b7c6c4c8c322cef | |
parent | 01ae7584d279479688a01cd35a0bc149504bf669 (diff) | |
download | FreeBSD-ports-d5a367a9d752505e83b5839cb08f1d16e19f0058.zip FreeBSD-ports-d5a367a9d752505e83b5839cb08f1d16e19f0058.tar.gz |
Prevent collision with dprintf(3)
-rw-r--r-- | security/bsmtrace/files/patch-bsm.c | 56 | ||||
-rw-r--r-- | security/bsmtrace/files/patch-bsmtrace.c | 11 | ||||
-rw-r--r-- | security/bsmtrace/files/patch-bsmtrace.h | 10 | ||||
-rw-r--r-- | security/bsmtrace/files/patch-trigger.c | 11 |
4 files changed, 88 insertions, 0 deletions
diff --git a/security/bsmtrace/files/patch-bsm.c b/security/bsmtrace/files/patch-bsm.c new file mode 100644 index 0000000..9efd6a5 --- /dev/null +++ b/security/bsmtrace/files/patch-bsm.c @@ -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. + */ diff --git a/security/bsmtrace/files/patch-bsmtrace.c b/security/bsmtrace/files/patch-bsmtrace.c new file mode 100644 index 0000000..3b6cc52 --- /dev/null +++ b/security/bsmtrace/files/patch-bsmtrace.c @@ -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; diff --git a/security/bsmtrace/files/patch-bsmtrace.h b/security/bsmtrace/files/patch-bsmtrace.h new file mode 100644 index 0000000..fc9f412 --- /dev/null +++ b/security/bsmtrace/files/patch-bsmtrace.h @@ -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_ */ diff --git a/security/bsmtrace/files/patch-trigger.c b/security/bsmtrace/files/patch-trigger.c new file mode 100644 index 0000000..a7b1de0 --- /dev/null +++ b/security/bsmtrace/files/patch-trigger.c @@ -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; |