diff options
author | A. Cody Schuffelen <schuffelen@google.com> | 2023-11-30 21:45:25 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-11-30 21:45:25 +0000 |
commit | 0c27d675a81574919eb06a84da0e2efb9b204da8 (patch) | |
tree | 8beb9375bf52ebf8e075445546e6d330e76f60dc | |
parent | 28b060ce5c8667e7c13654cc7af4f764004df1b7 (diff) | |
parent | 9fc743c74bd003bdbde261f56de9588f608a9090 (diff) | |
download | sandboxed-api-0c27d675a81574919eb06a84da0e2efb9b204da8.tar.gz |
Add more files to the sandboxed_api_sandbox2 target am: 549ae36505 am: 675a945aeb am: 9fc743c74b
Original change: https://android-review.googlesource.com/c/platform/external/sandboxed-api/+/2850159
Change-Id: I71e816051108c2837b7556c0e22ac645622db384
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; |