aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-10-28 06:33:00 -0400
committerMike Frysinger <vapier@gentoo.org>2021-10-28 06:33:00 -0400
commit04a58bcbdf1002ccaddeb03bb13505350baeb996 (patch)
treeeaa45ef51961895659241f8da8fc7d5248cb9f5d /scripts
parentbuild: create libsandbox for trace_syscalls.h too (diff)
downloadsandbox-04a58bcbdf1002ccaddeb03bb13505350baeb996.tar.gz
sandbox-04a58bcbdf1002ccaddeb03bb13505350baeb996.tar.bz2
sandbox-04a58bcbdf1002ccaddeb03bb13505350baeb996.zip
libsandbox: hoist the *at pre-check functions up a level
The reason we put these in wrapper-funcs/ is because we normally dynamically include them when the corresponding symbol is available. For example, if the C library supports symbol foo, and there is a wrapper-funcs/foo_pre_check.c, we'll automatically include it based on the assumption that wrapper-funcs/foo.c needs it. But if the C library doesn't have a symbol foo, we won't include foo.c or the foo_pre_check.c file at all. Sounds fine. The *at family of functions is a bit different because we end up using them both in the wrapper-funcs/ files, and in the trace code, the latter of which we use unconditionally. This lead to a build issue early on (see commit b27df46f349e850067ae388fe067b043abf3aecb ("libsandbox: fix missing *at pre_checks")) whereby we hacked in these *at pre-check symbols all the time. At which point, having them be in wrapper-funcs/ was more out of convention with how we manage all our other APIs. We want to support running ptrace from the sandbox binary directly which requires linking (most of) libsandbox into it, and to that end, hoist these pre-check functions out of wrapper-funcs. This makes it a bit clearer that we always want to compile these. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/gen_symbol_header.awk2
1 files changed, 0 insertions, 2 deletions
diff --git a/scripts/gen_symbol_header.awk b/scripts/gen_symbol_header.awk
index e669c85..0180f6c 100644
--- a/scripts/gen_symbol_header.awk
+++ b/scripts/gen_symbol_header.awk
@@ -201,8 +201,6 @@ END {
}
}
- printf("#include \"wrapper-funcs/__pre_check.c\"\n");
-
printf("#define SB_MAX_STRING_LEN %i\n\n", SB_MAX_STRING_LEN);
printf("#endif /* __symbols_h */\n");