mirror of
https://github.com/google/sandboxed-api.git
synced 2024-03-22 13:11:30 +08:00
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:
parent
5d216fb191
commit
90d276f913
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
#include "absl/memory/memory.h"
|
#include "absl/memory/memory.h"
|
||||||
#include "absl/strings/str_cat.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.h"
|
||||||
#include "sandboxed_api/sandbox2/forkserver.pb.h"
|
#include "sandboxed_api/sandbox2/forkserver.pb.h"
|
||||||
#include "sandboxed_api/sandbox2/global_forkclient.h"
|
#include "sandboxed_api/sandbox2/global_forkclient.h"
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include "sandboxed_api/util/flag.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/bpfdisassembler.h"
|
||||||
#include "sandboxed_api/sandbox2/comms.h"
|
#include "sandboxed_api/sandbox2/comms.h"
|
||||||
#include "sandboxed_api/sandbox2/regs.h"
|
#include "sandboxed_api/sandbox2/regs.h"
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include "absl/strings/numbers.h"
|
#include "absl/strings/numbers.h"
|
||||||
#include "absl/strings/str_cat.h"
|
#include "absl/strings/str_cat.h"
|
||||||
#include "absl/strings/strip.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/comms.h"
|
||||||
#include "sandboxed_api/sandbox2/executor.h"
|
#include "sandboxed_api/sandbox2/executor.h"
|
||||||
#include "sandboxed_api/sandbox2/ipc.h"
|
#include "sandboxed_api/sandbox2/ipc.h"
|
||||||
|
|
|
@ -811,7 +811,7 @@ class Generator(object):
|
||||||
if call_arguments: # fake empty space to add ',' before first argument
|
if call_arguments: # fake empty space to add ',' before first argument
|
||||||
call_arguments.insert(0, '')
|
call_arguments.insert(0, '')
|
||||||
result.append('')
|
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{}));'
|
result.append(' SAPI_RETURN_IF_ERROR(sandbox_->Call("{}", &ret{}));'
|
||||||
''.format(f.name, ', '.join(call_arguments)))
|
''.format(f.name, ', '.join(call_arguments)))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user