diff options
author | A. Cody Schuffelen <schuffelen@google.com> | 2023-11-30 20:30:47 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-11-30 20:30:47 +0000 |
commit | 675a945aebd3578d4e18eeeddd2810ec74dce58c (patch) | |
tree | 8beb9375bf52ebf8e075445546e6d330e76f60dc | |
parent | 692625a4eec76c3f0c9aadda6217a76d3ec9e201 (diff) | |
parent | 549ae365059261d78afb327e0715ec4e76e4f332 (diff) | |
download | sandboxed-api-675a945aebd3578d4e18eeeddd2810ec74dce58c.tar.gz |
Add more files to the sandboxed_api_sandbox2 target am: 549ae36505
Original change: https://android-review.googlesource.com/c/platform/external/sandboxed-api/+/2850159
Change-Id: Ib92f216122ebab5f3aed4b85393fcdaf0672912f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | Android.bp | 12 | ||||
-rw-r--r-- | android/sandboxed_api_glibc_compat.h | 23 | ||||
-rw-r--r-- | android/sandboxed_api_musl_compat.h | 6 |
3 files changed, 41 insertions, 0 deletions
@@ -76,6 +76,7 @@ cc_defaults { }, cflags: [ "-Wno-unused-parameter", + "-Wno-missing-field-initializers", // for sandboxed_api/sandbox2/policy.cc "-fbracket-depth=768", // for syscall_defs.cc ], defaults: ["sandboxed_api_defaults"], @@ -235,10 +236,21 @@ cc_library { srcs: [ "sandboxed_api/embed_file.cc", "sandboxed_api/sandbox2/executor.cc", + "sandboxed_api/sandbox2/forkingclient.cc", "sandboxed_api/sandbox2/global_forkclient.cc", + "sandboxed_api/sandbox2/monitor_base.cc", + "sandboxed_api/sandbox2/monitor_ptrace.cc", + "sandboxed_api/sandbox2/monitor_unotify.cc", + "sandboxed_api/sandbox2/policy.cc", + "sandboxed_api/sandbox2/policybuilder.cc", + "sandboxed_api/sandbox2/sandbox2.cc", + "sandboxed_api/sandbox2/stack_trace.cc", + "sandboxed_api/sandbox2/network_proxy/filtering.cc", + "sandboxed_api/sandbox2/network_proxy/server.cc", ], visibility: ["//device/google/cuttlefish:__subpackages__"], whole_static_libs: [ + "sandboxed_api_proto", "sandboxed_api_shared_with_filewrapper", "sandboxed_api_shared_with_forkserver", ], diff --git a/android/sandboxed_api_glibc_compat.h b/android/sandboxed_api_glibc_compat.h index 5765cf0..8211e98 100644 --- a/android/sandboxed_api_glibc_compat.h +++ b/android/sandboxed_api_glibc_compat.h @@ -17,3 +17,26 @@ // Typo in old glibc #define PTRACE_EVENT_SECCOMP PTRAVE_EVENT_SECCOMP +// From aosp/599933 +/* + * Older glibc builds predate seccomp inclusion. These arches are the ones + * AOSP needs and doesn't provide anything newer. All other targets can upgrade + * their kernel headers. + */ +#ifndef SYS_seccomp +# if defined(__x86_64__) +# define SYS_seccomp 317 +# elif defined(__i386__) +# define SYS_seccomp 354 +# elif defined(__aarch64__) +# define SYS_seccomp 277 +# elif defined(__arm__) +# define SYS_seccomp 383 +# else +# error "Update your kernel headers" +# endif +#endif + +#ifndef PTRACE_O_EXITKILL +#define PTRACE_O_EXITKILL (1 << 20) +#endif diff --git a/android/sandboxed_api_musl_compat.h b/android/sandboxed_api_musl_compat.h index 370a57c..6d4f384 100644 --- a/android/sandboxed_api_musl_compat.h +++ b/android/sandboxed_api_musl_compat.h @@ -14,4 +14,10 @@ // limitations under the License. #pragma once +// From aosp/2263921 +#define __SIGRTMIN 32 +#define __SIGRTMAX 64 + typedef int __ptrace_request; + +typedef int __rlimit_resource; |