Improve internal<->external code transforms

This includes changing the way libcap headers are included.

PiperOrigin-RevId: 239173120
Change-Id: I5562d924b96bab26a29342903895324bfe385e5a
This commit is contained in:
Christian Blichmann 2019-03-19 05:51:30 -07:00 committed by Copybara-Service
parent 5d216fb191
commit 90d276f913
4 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@
#include "absl/memory/memory.h"
#include "absl/strings/str_cat.h"
#include <sys/capability.h>
#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"

View File

@ -28,7 +28,7 @@
#include <glog/logging.h>
#include "sandboxed_api/util/flag.h"
#include <sys/capability.h>
#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"

View File

@ -29,7 +29,7 @@
#include "absl/strings/numbers.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/strip.h"
#include <sys/capability.h>
#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"

View File

@ -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)))