aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libsandbox')
-rw-r--r--libsandbox/libsandbox.h2
-rw-r--r--libsandbox/trace.c6
-rw-r--r--libsandbox/wrapper-funcs/__wrapper_exec.c6
3 files changed, 7 insertions, 7 deletions
diff --git a/libsandbox/libsandbox.h b/libsandbox/libsandbox.h
index fbea6ba..206c506 100644
--- a/libsandbox/libsandbox.h
+++ b/libsandbox/libsandbox.h
@@ -82,7 +82,7 @@ extern void sb_lock(void);
extern void sb_unlock(void);
bool trace_possible(const char *filename, char *const argv[], const void *data);
-void trace_main(const char *filename, char *const argv[]);
+void trace_main(void);
/* glibc modified realpath() function */
char *erealpath(const char *, char *);
diff --git a/libsandbox/trace.c b/libsandbox/trace.c
index d53051d..4e01f6e 100644
--- a/libsandbox/trace.c
+++ b/libsandbox/trace.c
@@ -510,12 +510,10 @@ static void trace_loop(void)
} while (1);
}
-void trace_main(const char *filename, char *const argv[])
+void trace_main(void)
{
struct sigaction old_sa, sa = { .sa_handler = SIG_DFL, };
- sb_debug_dyn("trace_main: tracing: %s\n", filename);
-
if (trace_pid)
sb_ebort("ISE: trace code assumes multiple threads are not forking\n");
@@ -550,7 +548,7 @@ void trace_main(const char *filename, char *const argv[])
#undef _trace_possible
#define _trace_possible(data) false
-void trace_main(const char *filename, char *const argv[])
+void trace_main(void)
{
/* trace_possible() triggers a warning for us */
}
diff --git a/libsandbox/wrapper-funcs/__wrapper_exec.c b/libsandbox/wrapper-funcs/__wrapper_exec.c
index 8ea5255..d66e3a0 100644
--- a/libsandbox/wrapper-funcs/__wrapper_exec.c
+++ b/libsandbox/wrapper-funcs/__wrapper_exec.c
@@ -242,8 +242,10 @@ static bool sb_check_exec(const char *filename, char *const argv[])
out_fd:
close(fd);
- if (do_trace)
- trace_main(filename, argv);
+ if (do_trace) {
+ sb_debug_dyn("tracing: %s\n", filename);
+ trace_main();
+ }
return run_in_process;
}