1 |
commit: b9a9f6239d46f54ff1fc747b73ddf58082aa6559 |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 29 04:02:22 2021 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 29 04:02:22 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=b9a9f623 |
7 |
|
8 |
libsandbox: drop args to trace_main |
9 |
|
10 |
The filename was only used for a single debug print, and the args |
11 |
ignored completely. Don't bother passing them down at all. |
12 |
|
13 |
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org> |
14 |
|
15 |
libsandbox/libsandbox.h | 2 +- |
16 |
libsandbox/trace.c | 6 ++---- |
17 |
libsandbox/wrapper-funcs/__wrapper_exec.c | 6 ++++-- |
18 |
3 files changed, 7 insertions(+), 7 deletions(-) |
19 |
|
20 |
diff --git a/libsandbox/libsandbox.h b/libsandbox/libsandbox.h |
21 |
index fbea6ba..206c506 100644 |
22 |
--- a/libsandbox/libsandbox.h |
23 |
+++ b/libsandbox/libsandbox.h |
24 |
@@ -82,7 +82,7 @@ extern void sb_lock(void); |
25 |
extern void sb_unlock(void); |
26 |
|
27 |
bool trace_possible(const char *filename, char *const argv[], const void *data); |
28 |
-void trace_main(const char *filename, char *const argv[]); |
29 |
+void trace_main(void); |
30 |
|
31 |
/* glibc modified realpath() function */ |
32 |
char *erealpath(const char *, char *); |
33 |
|
34 |
diff --git a/libsandbox/trace.c b/libsandbox/trace.c |
35 |
index d53051d..4e01f6e 100644 |
36 |
--- a/libsandbox/trace.c |
37 |
+++ b/libsandbox/trace.c |
38 |
@@ -510,12 +510,10 @@ static void trace_loop(void) |
39 |
} while (1); |
40 |
} |
41 |
|
42 |
-void trace_main(const char *filename, char *const argv[]) |
43 |
+void trace_main(void) |
44 |
{ |
45 |
struct sigaction old_sa, sa = { .sa_handler = SIG_DFL, }; |
46 |
|
47 |
- sb_debug_dyn("trace_main: tracing: %s\n", filename); |
48 |
- |
49 |
if (trace_pid) |
50 |
sb_ebort("ISE: trace code assumes multiple threads are not forking\n"); |
51 |
|
52 |
@@ -550,7 +548,7 @@ void trace_main(const char *filename, char *const argv[]) |
53 |
#undef _trace_possible |
54 |
#define _trace_possible(data) false |
55 |
|
56 |
-void trace_main(const char *filename, char *const argv[]) |
57 |
+void trace_main(void) |
58 |
{ |
59 |
/* trace_possible() triggers a warning for us */ |
60 |
} |
61 |
|
62 |
diff --git a/libsandbox/wrapper-funcs/__wrapper_exec.c b/libsandbox/wrapper-funcs/__wrapper_exec.c |
63 |
index 8ea5255..d66e3a0 100644 |
64 |
--- a/libsandbox/wrapper-funcs/__wrapper_exec.c |
65 |
+++ b/libsandbox/wrapper-funcs/__wrapper_exec.c |
66 |
@@ -242,8 +242,10 @@ static bool sb_check_exec(const char *filename, char *const argv[]) |
67 |
out_fd: |
68 |
close(fd); |
69 |
|
70 |
- if (do_trace) |
71 |
- trace_main(filename, argv); |
72 |
+ if (do_trace) { |
73 |
+ sb_debug_dyn("tracing: %s\n", filename); |
74 |
+ trace_main(); |
75 |
+ } |
76 |
|
77 |
return run_in_process; |
78 |
} |