summaryrefslogtreecommitdiffstats
path: root/bin/systrace/systrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/systrace/systrace.c')
-rw-r--r--bin/systrace/systrace.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/bin/systrace/systrace.c b/bin/systrace/systrace.c
index 5eaca041569..9b5bd1c2be2 100644
--- a/bin/systrace/systrace.c
+++ b/bin/systrace/systrace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: systrace.c,v 1.42 2002/12/12 00:39:14 avsm Exp $ */
+/* $OpenBSD: systrace.c,v 1.43 2003/06/16 06:36:40 itojun Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -124,7 +124,7 @@ make_output(char *output, size_t outlen, const char *binname,
if (line == NULL)
continue;
- snprintf(p, size, ", %s: %s", tl->name, line);
+ snprintf(p, size, ", %s: %s", tl->name, strescape(line));
p = output + strlen(output);
size = outlen - strlen(output);
@@ -377,6 +377,18 @@ execres_cb(int fd, pid_t pid, int policynr, const char *emulation,
fprintf(stderr, "Terminating %d: %s\n", pid, name);
}
+void
+policyfree_cb(int policynr, void *arg)
+{
+ struct policy *policy;
+
+ if ((policy = systrace_findpolnr(policynr)) == NULL)
+ errx(1, "%s:%d: find %d", __func__, __LINE__,
+ policynr);
+
+ systrace_freepolicy(policy);
+}
+
static void
child_handler(int sig)
{