From 90d276f9134e3b5c1248338191d8fd339525b7ae Mon Sep 17 00:00:00 2001 From: Christian Blichmann Date: Tue, 19 Mar 2019 05:51:30 -0700 Subject: [PATCH] Improve internal<->external code transforms This includes changing the way libcap headers are included. PiperOrigin-RevId: 239173120 Change-Id: I5562d924b96bab26a29342903895324bfe385e5a --- sandboxed_api/sandbox2/executor.cc | 2 +- sandboxed_api/sandbox2/policy.cc | 2 +- sandboxed_api/sandbox2/stack-trace.cc | 2 +- sandboxed_api/tools/generator2/code.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sandboxed_api/sandbox2/executor.cc b/sandboxed_api/sandbox2/executor.cc index 800e267..a01e870 100644 --- a/sandboxed_api/sandbox2/executor.cc +++ b/sandboxed_api/sandbox2/executor.cc @@ -26,7 +26,7 @@ #include "absl/memory/memory.h" #include "absl/strings/str_cat.h" -#include +#include "external/org_kernel_libcap/libcap/include/sys/capability.h" #include "sandboxed_api/sandbox2/forkserver.h" #include "sandboxed_api/sandbox2/forkserver.pb.h" #include "sandboxed_api/sandbox2/global_forkclient.h" diff --git a/sandboxed_api/sandbox2/policy.cc b/sandboxed_api/sandbox2/policy.cc index 00b2152..d19874b 100644 --- a/sandboxed_api/sandbox2/policy.cc +++ b/sandboxed_api/sandbox2/policy.cc @@ -28,7 +28,7 @@ #include #include "sandboxed_api/util/flag.h" -#include +#include "external/org_kernel_libcap/libcap/include/sys/capability.h" #include "sandboxed_api/sandbox2/bpfdisassembler.h" #include "sandboxed_api/sandbox2/comms.h" #include "sandboxed_api/sandbox2/regs.h" diff --git a/sandboxed_api/sandbox2/stack-trace.cc b/sandboxed_api/sandbox2/stack-trace.cc index ebb8218..ee05d1c 100644 --- a/sandboxed_api/sandbox2/stack-trace.cc +++ b/sandboxed_api/sandbox2/stack-trace.cc @@ -29,7 +29,7 @@ #include "absl/strings/numbers.h" #include "absl/strings/str_cat.h" #include "absl/strings/strip.h" -#include +#include "external/org_kernel_libcap/libcap/include/sys/capability.h" #include "sandboxed_api/sandbox2/comms.h" #include "sandboxed_api/sandbox2/executor.h" #include "sandboxed_api/sandbox2/ipc.h" diff --git a/sandboxed_api/tools/generator2/code.py b/sandboxed_api/tools/generator2/code.py index ca1ec11..9a2299d 100644 --- a/sandboxed_api/tools/generator2/code.py +++ b/sandboxed_api/tools/generator2/code.py @@ -811,7 +811,7 @@ class Generator(object): if call_arguments: # fake empty space to add ',' before first argument call_arguments.insert(0, '') result.append('') - # In OSS code, the code below uses SAPI_RETURN_IF_ERROR(). + # For OSS, the macro below will be replaced. result.append(' SAPI_RETURN_IF_ERROR(sandbox_->Call("{}", &ret{}));' ''.format(f.name, ', '.join(call_arguments)))