2020-01-17 21:05:03 +08:00
|
|
|
# Copyright 2019 Google LLC
|
2019-05-06 20:03:29 +08:00
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
2022-01-28 17:38:27 +08:00
|
|
|
# https://www.apache.org/licenses/LICENSE-2.0
|
2019-05-06 20:03:29 +08:00
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
2019-06-07 22:27:06 +08:00
|
|
|
add_subdirectory(examples)
|
2019-05-06 20:03:29 +08:00
|
|
|
add_subdirectory(unwind)
|
|
|
|
add_subdirectory(util)
|
2020-02-20 23:45:22 +08:00
|
|
|
add_subdirectory(network_proxy)
|
2019-05-06 20:03:29 +08:00
|
|
|
|
2023-03-01 21:35:51 +08:00
|
|
|
# sandboxed_api/sandbox2:allow_all_syscalls
|
|
|
|
add_library(sandbox2_allow_all_syscalls ${SAPI_LIB_TYPE}
|
|
|
|
allow_all_syscalls.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::allow_all_syscalls ALIAS sandbox2_allow_all_syscalls)
|
|
|
|
target_link_libraries(sandbox2_allow_all_syscalls PRIVATE
|
|
|
|
sapi::base
|
|
|
|
)
|
|
|
|
|
2023-05-04 14:29:00 +08:00
|
|
|
# sandboxed_api/sandbox2:allow_unrestricted_networking
|
|
|
|
add_library(sandbox2_allow_unrestricted_networking ${SAPI_LIB_TYPE}
|
|
|
|
allow_unrestricted_networking.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::allow_unrestricted_networking ALIAS sandbox2_allow_unrestricted_networking)
|
|
|
|
target_link_libraries(sandbox2_allow_unrestricted_networking PRIVATE
|
|
|
|
sapi::base
|
|
|
|
)
|
|
|
|
|
2019-05-06 20:03:29 +08:00
|
|
|
# sandboxed_api/sandbox2:bpfdisassembler
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_bpfdisassembler ${SAPI_LIB_TYPE}
|
2019-05-06 20:03:29 +08:00
|
|
|
bpfdisassembler.cc
|
|
|
|
bpfdisassembler.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::bpfdisassembler ALIAS sandbox2_bpfdisassembler)
|
2023-03-07 21:03:22 +08:00
|
|
|
target_link_libraries(sandbox2_bpfdisassembler
|
|
|
|
PUBLIC absl::span
|
|
|
|
PRIVATE absl::strings
|
|
|
|
sapi::base
|
2019-05-06 20:03:29 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:regs
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_regs ${SAPI_LIB_TYPE}
|
2019-05-06 20:03:29 +08:00
|
|
|
regs.cc
|
|
|
|
regs.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::regs ALIAS sandbox2_regs)
|
2022-01-07 21:25:42 +08:00
|
|
|
target_link_libraries(sandbox2_regs
|
|
|
|
PUBLIC absl::status
|
|
|
|
sapi::config
|
|
|
|
sandbox2::syscall
|
|
|
|
sandbox2::violation_proto
|
|
|
|
PRIVATE absl::core_headers
|
|
|
|
absl::strings
|
|
|
|
sapi::strerror
|
|
|
|
sapi::base
|
|
|
|
sapi::status
|
2019-05-06 20:03:29 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:syscall
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_syscall ${SAPI_LIB_TYPE}
|
2019-05-06 20:03:29 +08:00
|
|
|
syscall.cc
|
|
|
|
syscall.h
|
|
|
|
syscall_defs.cc
|
|
|
|
syscall_defs.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::syscall ALIAS sandbox2_syscall)
|
|
|
|
target_link_libraries(sandbox2_syscall
|
2020-11-25 22:15:06 +08:00
|
|
|
PRIVATE absl::algorithm_container
|
|
|
|
absl::span
|
2023-08-24 21:23:03 +08:00
|
|
|
absl::statusor
|
2019-05-06 20:03:29 +08:00
|
|
|
absl::str_format
|
|
|
|
absl::strings
|
|
|
|
sandbox2::util
|
|
|
|
sapi::base
|
2022-10-20 21:48:06 +08:00
|
|
|
PUBLIC absl::log
|
2019-05-06 20:03:29 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:result
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_result ${SAPI_LIB_TYPE}
|
2019-05-06 20:03:29 +08:00
|
|
|
result.cc
|
|
|
|
result.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::result ALIAS sandbox2_result)
|
|
|
|
target_link_libraries(sandbox2_result PRIVATE
|
|
|
|
absl::base
|
|
|
|
absl::strings
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::config
|
2019-05-06 20:03:29 +08:00
|
|
|
sandbox2::regs
|
|
|
|
sandbox2::syscall
|
|
|
|
sandbox2::util
|
|
|
|
sapi::base
|
|
|
|
sapi::status
|
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:logserver_proto
|
2020-03-19 01:47:02 +08:00
|
|
|
sapi_protobuf_generate_cpp(_sandbox2_logserver_pb_h _sandbox2_logserver_pb_cc
|
2019-05-06 20:03:29 +08:00
|
|
|
logserver.proto
|
|
|
|
)
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_logserver_proto ${SAPI_LIB_TYPE}
|
2019-05-06 20:03:29 +08:00
|
|
|
${_sandbox2_logserver_pb_cc}
|
|
|
|
${_sandbox2_logserver_pb_h}
|
|
|
|
)
|
|
|
|
add_library(sandbox2::logserver_proto ALIAS sandbox2_logserver_proto)
|
2019-07-26 20:50:45 +08:00
|
|
|
target_link_libraries(sandbox2_logserver_proto
|
|
|
|
PRIVATE sapi::base
|
|
|
|
PUBLIC protobuf::libprotobuf
|
2019-05-06 20:03:29 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:logserver
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_logserver ${SAPI_LIB_TYPE}
|
2019-05-06 20:03:29 +08:00
|
|
|
logserver.cc
|
|
|
|
logserver.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::logserver ALIAS sandbox2_logserver)
|
|
|
|
target_link_libraries(sandbox2_logserver
|
2022-10-12 20:22:51 +08:00
|
|
|
PRIVATE sandbox2::comms
|
2019-05-06 20:03:29 +08:00
|
|
|
sandbox2::logserver_proto
|
|
|
|
sapi::base
|
2022-10-20 21:48:06 +08:00
|
|
|
PUBLIC absl::log
|
2019-05-06 20:03:29 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:logsink
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_logsink ${SAPI_LIB_TYPE}
|
2019-05-06 20:03:29 +08:00
|
|
|
logsink.cc
|
|
|
|
logsink.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::logsink ALIAS sandbox2_logsink)
|
|
|
|
target_link_libraries(sandbox2_logsink
|
|
|
|
PRIVATE absl::strings
|
|
|
|
sandbox2::comms
|
|
|
|
sandbox2::logserver_proto
|
|
|
|
sapi::base
|
2021-01-06 18:34:28 +08:00
|
|
|
PUBLIC absl::synchronization
|
2022-10-20 21:48:06 +08:00
|
|
|
absl::log
|
2019-05-06 20:03:29 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:ipc
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_ipc ${SAPI_LIB_TYPE}
|
2019-05-06 20:03:29 +08:00
|
|
|
ipc.cc
|
|
|
|
ipc.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::ipc ALIAS sandbox2_ipc)
|
|
|
|
target_link_libraries(sandbox2_ipc PRIVATE
|
|
|
|
absl::core_headers
|
|
|
|
absl::strings
|
|
|
|
sandbox2::comms
|
|
|
|
sandbox2::logserver
|
|
|
|
sandbox2::logsink
|
|
|
|
sandbox2::network_proxy_client
|
|
|
|
sandbox2::network_proxy_server
|
|
|
|
sapi::base
|
2023-08-17 16:12:41 +08:00
|
|
|
sapi::raw_logging
|
2019-05-06 20:03:29 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:policy
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_policy ${SAPI_LIB_TYPE}
|
2019-05-06 20:03:29 +08:00
|
|
|
policy.cc
|
|
|
|
policy.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::policy ALIAS sandbox2_policy)
|
2023-08-24 21:23:03 +08:00
|
|
|
target_link_libraries(sandbox2_policy
|
|
|
|
PRIVATE absl::strings
|
|
|
|
sandbox2::bpf_helper
|
|
|
|
sandbox2::bpfdisassembler
|
|
|
|
sandbox2::comms
|
|
|
|
sandbox2::regs
|
|
|
|
sandbox2::syscall
|
|
|
|
sapi::base
|
|
|
|
sapi::config
|
|
|
|
PUBLIC sandbox2::network_proxy_filtering
|
|
|
|
sandbox2::namespace
|
|
|
|
sandbox2::violation_proto
|
2019-05-06 20:03:29 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:notify
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_notify ${SAPI_LIB_TYPE}
|
2019-05-06 20:03:29 +08:00
|
|
|
notify.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::notify ALIAS sandbox2_notify)
|
2022-01-13 22:48:44 +08:00
|
|
|
target_link_libraries(sandbox2_notify
|
|
|
|
PUBLIC absl::core_headers
|
2022-10-20 21:48:06 +08:00
|
|
|
absl::log
|
2022-01-13 22:48:44 +08:00
|
|
|
sandbox2::comms
|
|
|
|
sandbox2::result
|
|
|
|
sandbox2::syscall
|
|
|
|
sandbox2::util
|
|
|
|
PRIVATE sapi::base
|
|
|
|
sapi::config
|
2019-05-06 20:03:29 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:limits
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_limits ${SAPI_LIB_TYPE}
|
2019-05-06 20:03:29 +08:00
|
|
|
limits.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::limits ALIAS sandbox2_limits)
|
|
|
|
target_link_libraries(sandbox2_limits PRIVATE
|
|
|
|
absl::core_headers
|
|
|
|
absl::time
|
|
|
|
sapi::base
|
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:forkserver_bin
|
2020-12-14 17:13:03 +08:00
|
|
|
add_executable(sandbox2_forkserver_bin
|
2019-05-06 20:03:29 +08:00
|
|
|
forkserver_bin.cc
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
set_target_properties(sandbox2_forkserver_bin PROPERTIES
|
|
|
|
OUTPUT_NAME forkserver_bin)
|
|
|
|
add_executable(sandbox2::forkserver_bin ALIAS sandbox2_forkserver_bin)
|
|
|
|
target_link_libraries(sandbox2_forkserver_bin PRIVATE
|
2022-10-20 21:48:06 +08:00
|
|
|
absl::log_globals
|
2023-08-24 21:23:03 +08:00
|
|
|
absl::log_severity
|
|
|
|
absl::status
|
2019-05-06 20:03:29 +08:00
|
|
|
sandbox2::client
|
|
|
|
sandbox2::comms
|
|
|
|
sandbox2::forkserver
|
2020-04-08 04:26:15 +08:00
|
|
|
sandbox2::sanitizer
|
2023-08-18 04:32:10 +08:00
|
|
|
sandbox2::unwind
|
2023-03-28 20:50:06 +08:00
|
|
|
sandbox2::util
|
2019-05-06 20:03:29 +08:00
|
|
|
sapi::base
|
|
|
|
sapi::raw_logging
|
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:forkserver_bin_embed
|
2020-12-14 17:13:03 +08:00
|
|
|
sapi_cc_embed_data(NAME sandbox2_forkserver_bin_embed
|
|
|
|
OUTPUT_NAME forkserver_bin_embed
|
2019-05-06 20:03:29 +08:00
|
|
|
NAMESPACE ""
|
2020-12-14 17:13:03 +08:00
|
|
|
SOURCES sandbox2::forkserver_bin
|
2019-05-06 20:03:29 +08:00
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
add_library(sandbox2::forkserver_bin_embed ALIAS sandbox2_forkserver_bin_embed)
|
2019-05-06 20:03:29 +08:00
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:global_forkserver
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_global_forkserver ${SAPI_LIB_TYPE}
|
2019-05-06 20:03:29 +08:00
|
|
|
global_forkclient.cc
|
|
|
|
global_forkclient.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::global_forkserver ALIAS sandbox2_global_forkserver)
|
2020-11-06 00:47:34 +08:00
|
|
|
target_link_libraries(sandbox2_global_forkserver
|
2023-01-03 21:36:02 +08:00
|
|
|
PRIVATE absl::cleanup
|
|
|
|
absl::strings
|
2022-03-03 00:11:37 +08:00
|
|
|
absl::status
|
|
|
|
absl::statusor
|
2022-10-20 21:48:06 +08:00
|
|
|
absl::log
|
2020-11-06 00:47:34 +08:00
|
|
|
sandbox2::client
|
|
|
|
sandbox2::forkserver_bin_embed
|
2023-03-28 20:50:06 +08:00
|
|
|
sandbox2::util
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::strerror
|
2020-11-06 00:47:34 +08:00
|
|
|
sapi::base
|
2022-03-03 00:11:37 +08:00
|
|
|
sapi::config
|
2020-11-06 00:47:34 +08:00
|
|
|
sapi::embed_file
|
2022-03-03 00:11:37 +08:00
|
|
|
sapi::fileops
|
2020-11-06 00:47:34 +08:00
|
|
|
sapi::raw_logging
|
2021-08-10 15:33:04 +08:00
|
|
|
sapi::status
|
2020-12-02 19:05:06 +08:00
|
|
|
PUBLIC absl::core_headers
|
2022-10-20 21:48:06 +08:00
|
|
|
absl::flags
|
2020-12-02 19:05:06 +08:00
|
|
|
absl::synchronization
|
|
|
|
sandbox2::comms
|
2020-11-06 00:47:34 +08:00
|
|
|
sandbox2::fork_client
|
|
|
|
sandbox2::forkserver_proto
|
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:start_global_forkserver_lib_constructor
|
|
|
|
# Use only if Sandbox2 global forkserver has to be started very early on.
|
|
|
|
# By default the forkserver is started on demand.
|
|
|
|
add_library(sandbox2_start_global_forkserver_lib_constructor STATIC
|
|
|
|
global_forkclient_lib_ctor.cc
|
|
|
|
)
|
|
|
|
add_library(sandbox2::start_global_forkserver_lib_constructor ALIAS
|
|
|
|
sandbox2_start_global_forkserver_lib_constructor)
|
|
|
|
target_link_libraries(sandbox2_start_global_forkserver_lib_constructor PRIVATE
|
2019-05-06 20:03:29 +08:00
|
|
|
absl::core_headers
|
|
|
|
sapi::base
|
2020-12-10 18:49:25 +08:00
|
|
|
sandbox2::fork_client
|
2020-11-06 00:47:34 +08:00
|
|
|
sandbox2::global_forkserver
|
2019-05-06 20:03:29 +08:00
|
|
|
)
|
|
|
|
|
2019-07-09 16:53:31 +08:00
|
|
|
# sandboxed_api/sandbox2:executor
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_executor ${SAPI_LIB_TYPE}
|
2019-05-06 20:03:29 +08:00
|
|
|
executor.cc
|
|
|
|
executor.h
|
2019-07-09 16:53:31 +08:00
|
|
|
)
|
|
|
|
add_library(sandbox2::executor ALIAS sandbox2_executor)
|
2020-12-15 01:15:40 +08:00
|
|
|
target_link_libraries(sandbox2_executor
|
|
|
|
PRIVATE absl::core_headers
|
2023-08-24 21:23:03 +08:00
|
|
|
absl::status
|
2020-12-15 01:15:40 +08:00
|
|
|
sandbox2::forkserver_proto
|
|
|
|
sandbox2::ipc
|
|
|
|
sandbox2::limits
|
|
|
|
sandbox2::namespace
|
|
|
|
sandbox2::util
|
|
|
|
sapi::base
|
|
|
|
sapi::status_proto
|
2022-10-20 21:48:06 +08:00
|
|
|
PUBLIC absl::log
|
|
|
|
absl::span
|
2023-08-24 21:23:03 +08:00
|
|
|
absl::statusor
|
2021-01-28 18:20:13 +08:00
|
|
|
absl::strings
|
2022-03-08 00:43:03 +08:00
|
|
|
sapi::config
|
2021-01-28 18:20:13 +08:00
|
|
|
sapi::fileops
|
2022-03-09 21:16:27 +08:00
|
|
|
sapi::status
|
2020-12-15 01:15:40 +08:00
|
|
|
sandbox2::fork_client
|
|
|
|
sandbox2::global_forkserver
|
2019-07-09 16:53:31 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:sandbox2
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_sandbox2 ${SAPI_LIB_TYPE}
|
2019-05-06 20:03:29 +08:00
|
|
|
sandbox2.cc
|
|
|
|
sandbox2.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::sandbox2 ALIAS sandbox2_sandbox2)
|
|
|
|
target_link_libraries(sandbox2_sandbox2
|
|
|
|
PRIVATE absl::core_headers
|
|
|
|
absl::flat_hash_set
|
2023-01-30 21:08:42 +08:00
|
|
|
absl::memory
|
2019-05-06 20:03:29 +08:00
|
|
|
absl::optional
|
|
|
|
absl::str_format
|
|
|
|
absl::strings
|
2023-03-09 00:08:35 +08:00
|
|
|
sandbox2::forkserver_proto
|
|
|
|
sandbox2::monitor_ptrace
|
|
|
|
sandbox2::monitor_unotify
|
2020-12-15 01:15:40 +08:00
|
|
|
sapi::base
|
2022-01-13 22:48:44 +08:00
|
|
|
PUBLIC absl::flat_hash_map
|
|
|
|
absl::status
|
2020-12-15 01:15:40 +08:00
|
|
|
absl::statusor
|
2019-05-06 20:03:29 +08:00
|
|
|
absl::time
|
2021-05-10 22:03:15 +08:00
|
|
|
sapi::config
|
|
|
|
sapi::fileops
|
|
|
|
sapi::temp_file
|
2019-05-06 20:03:29 +08:00
|
|
|
sandbox2::client
|
2020-12-15 01:15:40 +08:00
|
|
|
sandbox2::comms
|
2019-07-09 16:53:31 +08:00
|
|
|
sandbox2::executor
|
2020-07-17 19:54:20 +08:00
|
|
|
sandbox2::fork_client
|
2019-05-06 20:03:29 +08:00
|
|
|
sandbox2::global_forkserver
|
|
|
|
sandbox2::ipc
|
|
|
|
sandbox2::limits
|
2020-12-15 01:15:40 +08:00
|
|
|
sandbox2::logsink
|
2023-01-30 21:08:42 +08:00
|
|
|
sandbox2::monitor_base
|
2019-05-06 20:03:29 +08:00
|
|
|
sandbox2::mounts
|
2022-03-14 20:14:41 +08:00
|
|
|
sandbox2::mount_tree_proto
|
2019-05-06 20:03:29 +08:00
|
|
|
sandbox2::namespace
|
|
|
|
sandbox2::network_proxy_client
|
2020-12-15 01:15:40 +08:00
|
|
|
sandbox2::network_proxy_server
|
2019-05-06 20:03:29 +08:00
|
|
|
sandbox2::notify
|
|
|
|
sandbox2::policy
|
2023-01-27 17:24:14 +08:00
|
|
|
sandbox2::policybuilder
|
2019-05-06 20:03:29 +08:00
|
|
|
sandbox2::regs
|
|
|
|
sandbox2::result
|
|
|
|
sandbox2::syscall
|
|
|
|
sandbox2::util
|
|
|
|
sandbox2::violation_proto
|
|
|
|
)
|
|
|
|
|
2023-02-16 21:06:50 +08:00
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:stack_trace
|
|
|
|
add_library(sandbox2_stack_trace ${SAPI_LIB_TYPE}
|
|
|
|
stack_trace.cc
|
|
|
|
stack_trace.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::stack_trace ALIAS sandbox2_stack_trace)
|
|
|
|
target_link_libraries(sandbox2_stack_trace
|
|
|
|
PRIVATE absl::cleanup
|
|
|
|
absl::flags
|
|
|
|
absl::log
|
|
|
|
absl::memory
|
|
|
|
absl::status
|
|
|
|
absl::strings
|
2023-08-24 21:23:03 +08:00
|
|
|
absl::time
|
2023-02-16 21:06:50 +08:00
|
|
|
sandbox2::client
|
|
|
|
sandbox2::limits
|
2023-08-31 19:05:12 +08:00
|
|
|
sandbox2::mounts
|
2023-02-16 21:06:50 +08:00
|
|
|
sandbox2::policybuilder
|
|
|
|
sandbox2::util
|
|
|
|
sandbox2::unwind
|
|
|
|
sandbox2::unwind_proto
|
|
|
|
sapi::base
|
|
|
|
sapi::config
|
|
|
|
sapi::file_base
|
|
|
|
sapi::fileops
|
|
|
|
sapi::raw_logging
|
|
|
|
sapi::status
|
2023-08-24 21:23:03 +08:00
|
|
|
PUBLIC absl::check
|
|
|
|
absl::statusor
|
2023-02-16 21:06:50 +08:00
|
|
|
sandbox2::comms
|
|
|
|
sandbox2::executor
|
|
|
|
sandbox2::namespace
|
|
|
|
sandbox2::policy
|
|
|
|
sandbox2::result
|
|
|
|
sandbox2::regs
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2023-01-30 21:08:42 +08:00
|
|
|
# sandboxed_api/sandbox2:monitor_base
|
|
|
|
add_library(sandbox2_monitor_base ${SAPI_LIB_TYPE}
|
|
|
|
monitor_base.cc
|
|
|
|
monitor_base.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::monitor_base ALIAS sandbox2_monitor_base)
|
|
|
|
target_link_libraries(sandbox2_monitor_base
|
2023-02-07 18:22:02 +08:00
|
|
|
PRIVATE absl::cleanup
|
|
|
|
absl::status
|
|
|
|
absl::time
|
|
|
|
sandbox2::client
|
|
|
|
sandbox2::limits
|
|
|
|
sandbox2::mounts
|
|
|
|
sandbox2::namespace
|
2023-02-16 21:06:50 +08:00
|
|
|
sandbox2::stack_trace
|
2023-02-07 18:22:02 +08:00
|
|
|
sandbox2::util
|
|
|
|
sapi::file_helpers
|
|
|
|
sapi::temp_file
|
|
|
|
sapi::base
|
|
|
|
sapi::raw_logging
|
|
|
|
PUBLIC absl::statusor
|
2023-01-30 21:08:42 +08:00
|
|
|
absl::synchronization
|
|
|
|
sandbox2::comms
|
|
|
|
sandbox2::executor
|
2023-02-07 18:22:02 +08:00
|
|
|
sandbox2::fork_client
|
2023-01-30 21:08:42 +08:00
|
|
|
sandbox2::ipc
|
|
|
|
sandbox2::network_proxy_server
|
|
|
|
sandbox2::notify
|
|
|
|
sandbox2::policy
|
|
|
|
sandbox2::result
|
|
|
|
sandbox2::syscall
|
|
|
|
)
|
|
|
|
|
2023-02-16 21:06:50 +08:00
|
|
|
# sandboxed_api/sandbox2:monitor_ptrace
|
|
|
|
add_library(sandbox2_monitor_ptrace ${SAPI_LIB_TYPE}
|
|
|
|
monitor_ptrace.cc
|
|
|
|
monitor_ptrace.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::monitor_ptrace ALIAS sandbox2_monitor_ptrace)
|
|
|
|
target_link_libraries(sandbox2_monitor_ptrace
|
2023-08-24 21:23:03 +08:00
|
|
|
PRIVATE absl::core_headers
|
|
|
|
absl::cleanup
|
2023-02-16 21:06:50 +08:00
|
|
|
absl::flat_hash_set
|
|
|
|
absl::flags
|
2023-08-07 15:27:17 +08:00
|
|
|
absl::log
|
2023-02-16 21:06:50 +08:00
|
|
|
absl::status
|
2023-08-24 21:23:03 +08:00
|
|
|
absl::statusor
|
|
|
|
absl::str_format
|
2023-02-16 21:06:50 +08:00
|
|
|
absl::strings
|
|
|
|
absl::time
|
|
|
|
sapi::base
|
|
|
|
sapi::config
|
|
|
|
sapi::status
|
|
|
|
sandbox2::client
|
|
|
|
sandbox2::comms
|
|
|
|
sandbox2::result
|
|
|
|
sandbox2::sanitizer
|
|
|
|
sandbox2::util
|
2023-08-24 21:23:03 +08:00
|
|
|
PUBLIC absl::check
|
|
|
|
sandbox2::executor
|
2023-02-16 21:06:50 +08:00
|
|
|
sandbox2::monitor_base
|
|
|
|
sandbox2::notify
|
|
|
|
sandbox2::policy
|
|
|
|
sandbox2::regs
|
|
|
|
sandbox2::syscall
|
|
|
|
absl::synchronization
|
|
|
|
absl::flat_hash_map
|
|
|
|
sapi::raw_logging
|
|
|
|
)
|
|
|
|
|
2023-03-09 00:08:35 +08:00
|
|
|
# sandboxed_api/sandbox2:monitor_unotify
|
|
|
|
add_library(sandbox2_monitor_unotify ${SAPI_LIB_TYPE}
|
|
|
|
monitor_unotify.cc
|
|
|
|
monitor_unotify.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::monitor_unotify ALIAS sandbox2_monitor_unotify)
|
|
|
|
target_link_libraries(sandbox2_monitor_unotify
|
2023-08-24 21:23:03 +08:00
|
|
|
PRIVATE absl::check
|
|
|
|
absl::cleanup
|
|
|
|
absl::core_headers
|
2023-03-09 00:08:35 +08:00
|
|
|
absl::log
|
2023-08-24 21:23:03 +08:00
|
|
|
absl::optional
|
2023-08-30 17:55:35 +08:00
|
|
|
absl::span
|
2023-03-09 00:08:35 +08:00
|
|
|
absl::status
|
2023-08-24 21:23:03 +08:00
|
|
|
absl::strings
|
2023-03-09 00:08:35 +08:00
|
|
|
absl::time
|
|
|
|
sapi::base
|
|
|
|
sandbox2::client
|
|
|
|
sandbox2::forkserver_proto
|
2023-08-30 17:55:35 +08:00
|
|
|
sapi::config
|
|
|
|
sapi::status
|
2023-03-09 00:08:35 +08:00
|
|
|
PUBLIC sandbox2::executor
|
|
|
|
sandbox2::monitor_base
|
|
|
|
sandbox2::notify
|
|
|
|
sandbox2::policy
|
2023-08-30 17:55:35 +08:00
|
|
|
sandbox2::result
|
2023-03-09 00:08:35 +08:00
|
|
|
absl::statusor
|
|
|
|
absl::synchronization
|
2023-08-30 17:55:35 +08:00
|
|
|
sapi::fileops
|
2023-03-09 00:08:35 +08:00
|
|
|
sapi::raw_logging
|
|
|
|
)
|
|
|
|
|
2023-01-27 17:24:14 +08:00
|
|
|
# sandboxed_api/sandbox2:policybuilder
|
|
|
|
add_library(sandbox2_policybuilder ${SAPI_LIB_TYPE}
|
|
|
|
policybuilder.cc
|
|
|
|
policybuilder.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::policybuilder ALIAS sandbox2_policybuilder)
|
|
|
|
target_link_libraries(sandbox2_policybuilder
|
|
|
|
PRIVATE absl::log
|
|
|
|
absl::memory
|
|
|
|
absl::status
|
|
|
|
sapi::base
|
|
|
|
sapi::config
|
|
|
|
sandbox2::bpf_helper
|
|
|
|
sandbox2::namespace
|
2023-08-24 21:23:03 +08:00
|
|
|
sandbox2::syscall
|
2023-08-09 21:43:50 +08:00
|
|
|
sandbox2::violation_proto
|
2023-01-27 17:24:14 +08:00
|
|
|
sapi::file_base
|
|
|
|
sapi::status
|
|
|
|
PUBLIC absl::check
|
|
|
|
absl::core_headers
|
|
|
|
absl::flat_hash_set
|
|
|
|
absl::span
|
|
|
|
absl::strings
|
|
|
|
absl::statusor
|
|
|
|
sandbox2::mounts
|
|
|
|
sandbox2::network_proxy_filtering
|
|
|
|
sandbox2::policy
|
|
|
|
)
|
|
|
|
|
2019-05-06 20:03:29 +08:00
|
|
|
# sandboxed_api/sandbox2:client
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_client ${SAPI_LIB_TYPE}
|
2019-05-06 20:03:29 +08:00
|
|
|
client.cc
|
|
|
|
client.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::client ALIAS sandbox2_client)
|
|
|
|
target_link_libraries(sandbox2_client
|
|
|
|
PRIVATE absl::core_headers
|
|
|
|
absl::strings
|
2023-03-09 00:08:35 +08:00
|
|
|
sandbox2::bpf_helper
|
|
|
|
sandbox2::policy
|
2020-04-08 04:26:15 +08:00
|
|
|
sandbox2::sanitizer
|
2023-03-09 00:08:35 +08:00
|
|
|
sandbox2::syscall
|
2019-05-06 20:03:29 +08:00
|
|
|
sapi::base
|
|
|
|
sapi::raw_logging
|
2021-01-06 18:34:28 +08:00
|
|
|
PUBLIC absl::flat_hash_map
|
2023-08-24 00:03:05 +08:00
|
|
|
absl::status
|
2019-07-26 20:50:45 +08:00
|
|
|
sandbox2::comms
|
2021-01-06 18:34:28 +08:00
|
|
|
sandbox2::logsink
|
|
|
|
sandbox2::network_proxy_client
|
2019-05-06 20:03:29 +08:00
|
|
|
)
|
|
|
|
|
2020-04-08 04:26:15 +08:00
|
|
|
# sandboxed_api/sandbox2:sanitizer
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_sanitizer ${SAPI_LIB_TYPE}
|
2020-04-08 04:26:15 +08:00
|
|
|
sanitizer.cc
|
|
|
|
sanitizer.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::sanitizer ALIAS sandbox2_sanitizer)
|
|
|
|
target_link_libraries(sandbox2_sanitizer
|
2021-12-07 18:12:38 +08:00
|
|
|
PRIVATE absl::strings
|
|
|
|
sandbox2::util
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::fileops
|
|
|
|
sapi::strerror
|
2020-04-08 04:26:15 +08:00
|
|
|
sapi::raw_logging
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::base
|
2023-08-25 21:49:42 +08:00
|
|
|
PUBLIC absl::flat_hash_set
|
2021-12-07 18:12:38 +08:00
|
|
|
absl::status
|
|
|
|
absl::statusor
|
2020-04-08 04:26:15 +08:00
|
|
|
)
|
|
|
|
|
2019-05-06 20:03:29 +08:00
|
|
|
# sandboxed_api/sandbox2:forkserver
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_forkserver ${SAPI_LIB_TYPE}
|
2019-05-06 20:03:29 +08:00
|
|
|
forkserver.cc
|
|
|
|
forkserver.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::forkserver ALIAS sandbox2_forkserver)
|
2023-03-22 19:06:25 +08:00
|
|
|
target_link_libraries(sandbox2_forkserver
|
|
|
|
PRIVATE absl::flat_hash_map
|
|
|
|
absl::flat_hash_set
|
|
|
|
absl::status
|
|
|
|
absl::statusor
|
|
|
|
absl::strings
|
|
|
|
libcap::libcap
|
|
|
|
sandbox2::bpf_helper
|
|
|
|
sandbox2::client
|
|
|
|
sandbox2::comms
|
|
|
|
sandbox2::fork_client
|
|
|
|
sandbox2::forkserver_proto
|
|
|
|
sandbox2::namespace
|
|
|
|
sandbox2::policy
|
|
|
|
sapi::strerror
|
|
|
|
sandbox2::sanitizer
|
|
|
|
sandbox2::syscall
|
|
|
|
sandbox2::util
|
|
|
|
sapi::base
|
|
|
|
sapi::raw_logging
|
|
|
|
PUBLIC absl::core_headers
|
|
|
|
absl::log
|
2023-08-30 17:20:25 +08:00
|
|
|
sapi::fileops
|
2019-05-06 20:03:29 +08:00
|
|
|
)
|
|
|
|
|
2020-07-17 19:54:20 +08:00
|
|
|
# sandboxed_api/sandbox2:fork_client
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_fork_client ${SAPI_LIB_TYPE}
|
2020-07-17 19:54:20 +08:00
|
|
|
fork_client.cc
|
|
|
|
fork_client.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::fork_client ALIAS sandbox2_fork_client)
|
2023-03-09 00:08:35 +08:00
|
|
|
target_link_libraries(sandbox2_fork_client
|
|
|
|
PRIVATE sandbox2::comms
|
|
|
|
sandbox2::forkserver_proto
|
|
|
|
PUBLIC absl::core_headers
|
|
|
|
absl::synchronization
|
|
|
|
sapi::base
|
|
|
|
sapi::fileops
|
2020-07-17 19:54:20 +08:00
|
|
|
)
|
|
|
|
|
2019-05-06 20:03:29 +08:00
|
|
|
# sandboxed_api/sandbox2:mounts
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_mounts ${SAPI_LIB_TYPE}
|
2019-05-06 20:03:29 +08:00
|
|
|
mounts.cc
|
|
|
|
mounts.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::mounts ALIAS sandbox2_mounts)
|
2020-12-15 01:15:40 +08:00
|
|
|
target_link_libraries(sandbox2_mounts
|
2021-02-19 16:43:06 +08:00
|
|
|
PRIVATE absl::flat_hash_set
|
2020-12-15 01:15:40 +08:00
|
|
|
absl::str_format
|
|
|
|
protobuf::libprotobuf
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::config
|
|
|
|
sapi::file_base
|
|
|
|
sapi::fileops
|
2020-12-15 01:15:40 +08:00
|
|
|
sandbox2::minielf
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::strerror
|
2020-12-15 01:15:40 +08:00
|
|
|
sapi::base
|
|
|
|
sapi::raw_logging
|
|
|
|
sapi::status
|
2023-08-24 00:03:05 +08:00
|
|
|
PUBLIC absl::status
|
2021-02-19 16:43:06 +08:00
|
|
|
absl::statusor
|
|
|
|
absl::strings
|
2022-03-14 20:14:41 +08:00
|
|
|
sandbox2::mount_tree_proto
|
2019-05-06 20:03:29 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:namespace
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_namespace ${SAPI_LIB_TYPE}
|
2019-05-06 20:03:29 +08:00
|
|
|
namespace.cc
|
|
|
|
namespace.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::namespace ALIAS sandbox2_namespace)
|
2023-03-22 21:26:39 +08:00
|
|
|
target_link_libraries(sandbox2_namespace
|
|
|
|
PRIVATE absl::strings
|
|
|
|
sapi::file_base
|
|
|
|
sapi::fileops
|
|
|
|
sapi::base
|
|
|
|
sapi::raw_logging
|
|
|
|
PUBLIC sandbox2::violation_proto
|
|
|
|
sandbox2::mounts
|
2019-05-06 20:03:29 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:forkingclient
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_forkingclient ${SAPI_LIB_TYPE}
|
2019-05-06 20:03:29 +08:00
|
|
|
forkingclient.cc
|
|
|
|
forkingclient.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::forkingclient ALIAS sandbox2_forkingclient)
|
2019-06-07 22:27:06 +08:00
|
|
|
target_link_libraries(sandbox2_forkingclient
|
2023-08-24 21:23:03 +08:00
|
|
|
PRIVATE absl::check
|
|
|
|
absl::memory
|
2022-10-20 21:48:06 +08:00
|
|
|
absl::log
|
2020-04-08 04:26:15 +08:00
|
|
|
sandbox2::sanitizer
|
2019-06-07 22:27:06 +08:00
|
|
|
sapi::base
|
2023-03-29 17:21:31 +08:00
|
|
|
sapi::raw_logging
|
2019-07-26 20:50:45 +08:00
|
|
|
PUBLIC sandbox2::client
|
2021-01-06 18:34:28 +08:00
|
|
|
sandbox2::comms
|
|
|
|
sandbox2::forkserver
|
2019-05-06 20:03:29 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:util
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_util ${SAPI_LIB_TYPE}
|
2019-05-06 20:03:29 +08:00
|
|
|
util.cc
|
|
|
|
util.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::util ALIAS sandbox2_util)
|
2019-07-26 20:50:45 +08:00
|
|
|
target_link_libraries(sandbox2_util
|
2023-08-24 21:23:03 +08:00
|
|
|
PRIVATE absl::core_headers
|
2019-07-26 20:50:45 +08:00
|
|
|
absl::str_format
|
|
|
|
absl::strings
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::config
|
|
|
|
sapi::file_base
|
2021-04-17 03:42:41 +08:00
|
|
|
sapi::file_helpers
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::fileops
|
2019-07-26 20:50:45 +08:00
|
|
|
sapi::base
|
|
|
|
sapi::raw_logging
|
2020-02-28 01:23:44 +08:00
|
|
|
PUBLIC absl::status
|
2020-09-03 22:40:09 +08:00
|
|
|
absl::statusor
|
2019-05-06 20:03:29 +08:00
|
|
|
)
|
|
|
|
target_compile_options(sandbox2_util PRIVATE
|
|
|
|
# The default is 16384, however we need to do a clone with a
|
|
|
|
# stack-allocated buffer -- and PTHREAD_STACK_MIN also happens to be 16384.
|
|
|
|
# Thus the slight increase.
|
|
|
|
-Wframe-larger-than=17000
|
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:buffer
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_buffer ${SAPI_LIB_TYPE}
|
2019-05-06 20:03:29 +08:00
|
|
|
buffer.cc
|
|
|
|
buffer.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::buffer ALIAS sandbox2_buffer)
|
2020-12-15 01:15:40 +08:00
|
|
|
target_link_libraries(sandbox2_buffer
|
|
|
|
PRIVATE absl::core_headers
|
2022-10-25 21:20:08 +08:00
|
|
|
absl::memory
|
2020-12-15 01:15:40 +08:00
|
|
|
absl::status
|
|
|
|
absl::strings
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::strerror
|
2020-12-15 01:15:40 +08:00
|
|
|
sandbox2::util
|
|
|
|
sapi::base
|
|
|
|
sapi::status
|
|
|
|
PUBLIC absl::statusor
|
2019-05-06 20:03:29 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:forkserver_proto
|
2020-03-19 01:47:02 +08:00
|
|
|
sapi_protobuf_generate_cpp(_sandbox2_forkserver_pb_h _sandbox2_forkserver_pb_cc
|
2019-05-06 20:03:29 +08:00
|
|
|
forkserver.proto
|
|
|
|
)
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_forkserver_proto ${SAPI_LIB_TYPE}
|
2019-05-06 20:03:29 +08:00
|
|
|
${_sandbox2_forkserver_pb_cc}
|
|
|
|
${_sandbox2_forkserver_pb_h}
|
|
|
|
)
|
|
|
|
add_library(sandbox2::forkserver_proto ALIAS sandbox2_forkserver_proto)
|
|
|
|
target_link_libraries(sandbox2_forkserver_proto PRIVATE
|
|
|
|
protobuf::libprotobuf
|
2022-03-14 20:14:41 +08:00
|
|
|
sandbox2::mount_tree_proto
|
2019-05-06 20:03:29 +08:00
|
|
|
sapi::base
|
|
|
|
)
|
|
|
|
|
2022-03-14 20:14:41 +08:00
|
|
|
# sandboxed_api/sandbox2:mount_tree_proto
|
|
|
|
sapi_protobuf_generate_cpp(_sandbox2_mount_tree_pb_h _sandbox2_mount_tree_pb_cc
|
|
|
|
mount_tree.proto
|
2019-05-06 20:03:29 +08:00
|
|
|
)
|
2022-03-14 20:14:41 +08:00
|
|
|
add_library(sandbox2_mount_tree_proto ${SAPI_LIB_TYPE}
|
|
|
|
${_sandbox2_mount_tree_pb_cc}
|
|
|
|
${_sandbox2_mount_tree_pb_h}
|
2019-05-06 20:03:29 +08:00
|
|
|
)
|
2022-03-14 20:14:41 +08:00
|
|
|
add_library(sandbox2::mount_tree_proto ALIAS sandbox2_mount_tree_proto)
|
|
|
|
target_link_libraries(sandbox2_mount_tree_proto PRIVATE
|
2019-05-06 20:03:29 +08:00
|
|
|
protobuf::libprotobuf
|
|
|
|
sapi::base
|
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:comms
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_comms ${SAPI_LIB_TYPE}
|
2019-05-06 20:03:29 +08:00
|
|
|
comms.cc
|
|
|
|
comms.h
|
|
|
|
)
|
|
|
|
add_library(sandbox2::comms ALIAS sandbox2_comms)
|
2019-07-26 20:50:45 +08:00
|
|
|
target_link_libraries(sandbox2_comms
|
2022-10-25 20:50:16 +08:00
|
|
|
PRIVATE absl::die_if_null
|
|
|
|
absl::status
|
2020-09-03 22:40:09 +08:00
|
|
|
absl::statusor
|
2019-07-26 20:50:45 +08:00
|
|
|
absl::str_format
|
|
|
|
absl::strings
|
|
|
|
sandbox2::util
|
|
|
|
sapi::base
|
|
|
|
sapi::raw_logging
|
|
|
|
sapi::status_proto
|
|
|
|
PUBLIC absl::core_headers
|
2020-02-28 01:23:44 +08:00
|
|
|
absl::status
|
|
|
|
protobuf::libprotobuf
|
2023-09-19 20:13:40 +08:00
|
|
|
sapi::fileops
|
2019-07-26 20:50:45 +08:00
|
|
|
sapi::status
|
2019-05-06 20:03:29 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:violation_proto
|
2020-03-19 01:47:02 +08:00
|
|
|
sapi_protobuf_generate_cpp(_sandbox2_violation_pb_cc _sandbox2_violation_pb_h
|
2019-05-06 20:03:29 +08:00
|
|
|
violation.proto
|
|
|
|
)
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_violation_proto ${SAPI_LIB_TYPE}
|
2019-05-06 20:03:29 +08:00
|
|
|
${_sandbox2_violation_pb_cc}
|
|
|
|
${_sandbox2_violation_pb_h}
|
|
|
|
)
|
|
|
|
add_library(sandbox2::violation_proto ALIAS sandbox2_violation_proto)
|
|
|
|
target_link_libraries(sandbox2_violation_proto PRIVATE
|
|
|
|
protobuf::libprotobuf
|
2022-03-14 20:14:41 +08:00
|
|
|
sandbox2::mount_tree_proto
|
2019-05-06 20:03:29 +08:00
|
|
|
sapi::base
|
|
|
|
)
|
|
|
|
|
2022-04-21 16:17:08 +08:00
|
|
|
if(BUILD_TESTING AND SAPI_BUILD_TESTING)
|
2019-07-15 19:42:39 +08:00
|
|
|
add_subdirectory(testcases)
|
|
|
|
|
2022-01-07 21:25:42 +08:00
|
|
|
# sandboxed_api/sandbox2:regs_test
|
|
|
|
add_executable(sandbox2_regs_test
|
|
|
|
regs_test.cc
|
|
|
|
)
|
|
|
|
set_target_properties(sandbox2_regs_test PROPERTIES
|
|
|
|
OUTPUT_NAME regs_test
|
|
|
|
)
|
|
|
|
target_link_libraries(sandbox2_regs_test PRIVATE
|
2022-10-20 21:48:06 +08:00
|
|
|
absl::check
|
2022-01-07 21:25:42 +08:00
|
|
|
sapi::config
|
|
|
|
sapi::status_matchers
|
|
|
|
sandbox2::bpf_helper
|
|
|
|
sandbox2::regs
|
|
|
|
sandbox2::sanitizer
|
2023-08-25 21:49:42 +08:00
|
|
|
sandbox2::syscall
|
2022-01-07 21:25:42 +08:00
|
|
|
sandbox2::util
|
|
|
|
sapi::test_main
|
|
|
|
)
|
|
|
|
gtest_discover_tests_xcompile(sandbox2_regs_test)
|
|
|
|
|
2019-07-15 19:42:39 +08:00
|
|
|
# sandboxed_api/sandbox2:syscall_test
|
2020-12-14 17:13:03 +08:00
|
|
|
add_executable(sandbox2_syscall_test
|
2019-07-15 19:42:39 +08:00
|
|
|
syscall_test.cc
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
set_target_properties(sandbox2_syscall_test PROPERTIES
|
|
|
|
OUTPUT_NAME syscall_test
|
|
|
|
)
|
|
|
|
target_link_libraries(sandbox2_syscall_test PRIVATE
|
2019-07-15 19:42:39 +08:00
|
|
|
absl::strings
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::config
|
2019-07-15 19:42:39 +08:00
|
|
|
sandbox2::syscall
|
|
|
|
sapi::test_main
|
|
|
|
)
|
2020-12-15 01:15:40 +08:00
|
|
|
gtest_discover_tests_xcompile(sandbox2_syscall_test)
|
2019-07-15 19:42:39 +08:00
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:mounts_test
|
2020-12-14 17:13:03 +08:00
|
|
|
add_executable(sandbox2_mounts_test
|
2019-07-15 19:42:39 +08:00
|
|
|
mounts_test.cc
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
set_target_properties(sandbox2_mounts_test PROPERTIES
|
|
|
|
OUTPUT_NAME mounts_test
|
|
|
|
)
|
|
|
|
add_dependencies(sandbox2_mounts_test
|
2019-07-15 19:42:39 +08:00
|
|
|
sandbox2::testcase_minimal_dynamic
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
target_link_libraries(sandbox2_mounts_test PRIVATE
|
2023-08-24 21:23:03 +08:00
|
|
|
absl::status
|
2019-07-15 19:42:39 +08:00
|
|
|
absl::strings
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::file_base
|
2019-07-15 19:42:39 +08:00
|
|
|
sandbox2::mounts
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::temp_file
|
|
|
|
sapi::testing
|
2019-07-15 19:42:39 +08:00
|
|
|
sapi::status_matchers
|
|
|
|
sapi::test_main
|
|
|
|
)
|
2020-12-15 01:15:40 +08:00
|
|
|
gtest_discover_tests_xcompile(sandbox2_mounts_test PROPERTIES
|
2019-07-15 19:42:39 +08:00
|
|
|
ENVIRONMENT "TEST_TMPDIR=/tmp"
|
|
|
|
ENVIRONMENT "TEST_SRCDIR=${PROJECT_BINARY_DIR}"
|
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:namespace_test
|
2020-12-14 17:13:03 +08:00
|
|
|
add_executable(sandbox2_namespace_test
|
2019-07-15 19:42:39 +08:00
|
|
|
namespace_test.cc
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
set_target_properties(sandbox2_namespace_test PROPERTIES
|
|
|
|
OUTPUT_NAME namespace_test
|
|
|
|
)
|
|
|
|
add_dependencies(sandbox2_namespace_test
|
2019-07-15 19:42:39 +08:00
|
|
|
sandbox2::testcase_namespace
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
target_link_libraries(sandbox2_namespace_test PRIVATE
|
2023-08-24 21:23:03 +08:00
|
|
|
absl::check
|
|
|
|
absl::statusor
|
2019-07-15 19:42:39 +08:00
|
|
|
absl::strings
|
2023-03-01 21:35:51 +08:00
|
|
|
sandbox2::allow_all_syscalls
|
2023-05-04 14:29:00 +08:00
|
|
|
sandbox2::allow_unrestricted_networking
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::config
|
|
|
|
sapi::fileops
|
2019-07-15 19:42:39 +08:00
|
|
|
sandbox2::namespace
|
|
|
|
sandbox2::sandbox2
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::testing
|
|
|
|
sapi::temp_file
|
2019-07-15 19:42:39 +08:00
|
|
|
sapi::status_matchers
|
|
|
|
sapi::test_main
|
|
|
|
)
|
2020-12-15 01:15:40 +08:00
|
|
|
gtest_discover_tests_xcompile(sandbox2_namespace_test PROPERTIES
|
2019-07-15 19:42:39 +08:00
|
|
|
ENVIRONMENT "TEST_TMPDIR=/tmp"
|
|
|
|
ENVIRONMENT "TEST_SRCDIR=${PROJECT_BINARY_DIR}"
|
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:buffer_test
|
2020-12-14 17:13:03 +08:00
|
|
|
add_executable(sandbox2_buffer_test
|
2019-07-15 19:42:39 +08:00
|
|
|
buffer_test.cc
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
set_target_properties(sandbox2_buffer_test PROPERTIES
|
|
|
|
OUTPUT_NAME buffer_test
|
|
|
|
)
|
|
|
|
add_dependencies(sandbox2_buffer_test
|
2019-07-15 19:42:39 +08:00
|
|
|
sandbox2::testcase_buffer
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
target_link_libraries(sandbox2_buffer_test PRIVATE
|
2019-07-15 19:42:39 +08:00
|
|
|
sandbox2::buffer
|
|
|
|
sandbox2::sandbox2
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::testing
|
2019-07-15 19:42:39 +08:00
|
|
|
sapi::status_matchers
|
|
|
|
sapi::test_main
|
|
|
|
)
|
2020-12-15 01:15:40 +08:00
|
|
|
gtest_discover_tests_xcompile(sandbox2_buffer_test PROPERTIES
|
2019-07-15 19:42:39 +08:00
|
|
|
ENVIRONMENT "TEST_SRCDIR=${PROJECT_BINARY_DIR}"
|
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:comms_test_proto
|
2020-03-19 01:47:02 +08:00
|
|
|
sapi_protobuf_generate_cpp(
|
|
|
|
_sandbox2_comms_test_pb_h _sandbox2_comms_test_pb_cc
|
2019-07-15 19:42:39 +08:00
|
|
|
comms_test.proto
|
|
|
|
)
|
2020-12-15 01:15:40 +08:00
|
|
|
add_library(sandbox2_comms_test_proto ${SAPI_LIB_TYPE}
|
2019-07-15 19:42:39 +08:00
|
|
|
${_sandbox2_comms_test_pb_cc}
|
|
|
|
${_sandbox2_comms_test_pb_h}
|
|
|
|
)
|
|
|
|
add_library(sandbox2::comms_test_proto ALIAS sandbox2_comms_test_proto)
|
2019-07-30 21:48:16 +08:00
|
|
|
target_link_libraries(sandbox2_comms_test_proto
|
|
|
|
PRIVATE sapi::base
|
|
|
|
PUBLIC protobuf::libprotobuf
|
2019-07-15 19:42:39 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:comms_test
|
2020-12-14 17:13:03 +08:00
|
|
|
add_executable(sandbox2_comms_test
|
2019-07-15 19:42:39 +08:00
|
|
|
comms_test.cc
|
|
|
|
)
|
2022-10-20 21:48:06 +08:00
|
|
|
target_link_libraries(sandbox2_comms_test PRIVATE
|
|
|
|
absl::check
|
|
|
|
absl::fixed_array
|
|
|
|
absl::log
|
|
|
|
absl::strings
|
|
|
|
sandbox2::comms
|
|
|
|
sandbox2::comms_test_proto
|
|
|
|
sapi::status_matchers
|
|
|
|
sapi::test_main
|
2020-12-14 17:13:03 +08:00
|
|
|
)
|
2020-12-15 01:15:40 +08:00
|
|
|
gtest_discover_tests_xcompile(sandbox2_comms_test)
|
2019-07-15 19:42:39 +08:00
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:forkserver_test
|
2020-12-14 17:13:03 +08:00
|
|
|
add_executable(sandbox2_forkserver_test
|
2019-07-15 19:42:39 +08:00
|
|
|
forkserver_test.cc
|
|
|
|
global_forkclient.h
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
set_target_properties(sandbox2_forkserver_test PROPERTIES
|
|
|
|
OUTPUT_NAME forkserver_test
|
|
|
|
)
|
|
|
|
add_dependencies(sandbox2_forkserver_test
|
2019-07-15 19:42:39 +08:00
|
|
|
sandbox2::testcase_minimal
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
target_link_libraries(sandbox2_forkserver_test PRIVATE
|
2022-10-20 21:48:06 +08:00
|
|
|
absl::check
|
2019-07-15 19:42:39 +08:00
|
|
|
absl::strings
|
|
|
|
sandbox2::forkserver
|
|
|
|
sandbox2::forkserver_proto
|
|
|
|
sandbox2::sandbox2
|
2022-10-20 21:48:06 +08:00
|
|
|
sapi::raw_logging
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::testing
|
2019-07-15 19:42:39 +08:00
|
|
|
sapi::test_main
|
|
|
|
)
|
2020-12-15 01:15:40 +08:00
|
|
|
gtest_discover_tests_xcompile(sandbox2_forkserver_test PROPERTIES
|
2019-07-15 19:42:39 +08:00
|
|
|
ENVIRONMENT "TEST_TMPDIR=/tmp"
|
|
|
|
ENVIRONMENT "TEST_SRCDIR=${PROJECT_BINARY_DIR}"
|
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:limits_test
|
2020-12-14 17:13:03 +08:00
|
|
|
add_executable(sandbox2_limits_test
|
2019-07-15 19:42:39 +08:00
|
|
|
limits_test.cc
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
set_target_properties(sandbox2_limits_test PROPERTIES
|
|
|
|
OUTPUT_NAME limits_test
|
|
|
|
)
|
|
|
|
add_dependencies(sandbox2_limits_test
|
2019-07-15 19:42:39 +08:00
|
|
|
sandbox2::testcase_limits
|
|
|
|
sandbox2::testcase_minimal
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
target_link_libraries(sandbox2_limits_test PRIVATE
|
2019-07-15 19:42:39 +08:00
|
|
|
sandbox2::bpf_helper
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::config
|
2019-07-15 19:42:39 +08:00
|
|
|
sandbox2::limits
|
|
|
|
sandbox2::sandbox2
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::testing
|
2019-07-15 19:42:39 +08:00
|
|
|
sapi::status_matchers
|
|
|
|
sapi::test_main
|
|
|
|
)
|
2020-12-15 01:15:40 +08:00
|
|
|
gtest_discover_tests_xcompile(sandbox2_limits_test PROPERTIES
|
2019-07-15 19:42:39 +08:00
|
|
|
ENVIRONMENT "TEST_TMPDIR=/tmp"
|
|
|
|
ENVIRONMENT "TEST_SRCDIR=${PROJECT_BINARY_DIR}"
|
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:notify_test
|
2020-12-14 17:13:03 +08:00
|
|
|
add_executable(sandbox2_notify_test
|
2019-07-15 19:42:39 +08:00
|
|
|
notify_test.cc
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
set_target_properties(sandbox2_notify_test PROPERTIES
|
|
|
|
OUTPUT_NAME notify_test
|
|
|
|
)
|
|
|
|
add_dependencies(sandbox2_notify_test
|
2019-07-15 19:42:39 +08:00
|
|
|
sandbox2::testcase_personality
|
|
|
|
sandbox2::testcase_pidcomms
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
target_link_libraries(sandbox2_notify_test PRIVATE
|
2019-07-15 19:42:39 +08:00
|
|
|
absl::strings
|
|
|
|
sandbox2::comms
|
|
|
|
sandbox2::regs
|
|
|
|
sandbox2::sandbox2
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::testing
|
2019-07-15 19:42:39 +08:00
|
|
|
sapi::test_main
|
|
|
|
)
|
2020-12-15 01:15:40 +08:00
|
|
|
gtest_discover_tests_xcompile(sandbox2_notify_test PROPERTIES
|
2019-07-15 19:42:39 +08:00
|
|
|
ENVIRONMENT "TEST_TMPDIR=/tmp"
|
|
|
|
ENVIRONMENT "TEST_SRCDIR=${PROJECT_BINARY_DIR}"
|
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:policy_test
|
2020-12-14 17:13:03 +08:00
|
|
|
add_executable(sandbox2_policy_test
|
2019-07-15 19:42:39 +08:00
|
|
|
policy_test.cc
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
set_target_properties(sandbox2_policy_test PROPERTIES
|
|
|
|
OUTPUT_NAME policy_test
|
|
|
|
)
|
|
|
|
add_dependencies(sandbox2_policy_test
|
2019-07-15 19:42:39 +08:00
|
|
|
sandbox2::testcase_add_policy_on_syscalls
|
|
|
|
sandbox2::testcase_malloc_system
|
|
|
|
sandbox2::testcase_minimal
|
|
|
|
sandbox2::testcase_minimal_dynamic
|
|
|
|
sandbox2::testcase_policy
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
target_link_libraries(sandbox2_policy_test PRIVATE
|
2019-07-15 19:42:39 +08:00
|
|
|
absl::strings
|
|
|
|
sandbox2::bpf_helper
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::config
|
2019-07-15 19:42:39 +08:00
|
|
|
sandbox2::sandbox2
|
2023-03-03 22:50:17 +08:00
|
|
|
sapi::status_matchers
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::testing
|
2019-07-15 19:42:39 +08:00
|
|
|
sapi::test_main
|
|
|
|
)
|
2020-12-15 01:15:40 +08:00
|
|
|
gtest_discover_tests_xcompile(sandbox2_policy_test PROPERTIES
|
2019-07-15 19:42:39 +08:00
|
|
|
ENVIRONMENT "TEST_TMPDIR=/tmp"
|
|
|
|
ENVIRONMENT "TEST_SRCDIR=${PROJECT_BINARY_DIR}"
|
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:sandbox2_test
|
2020-12-14 17:13:03 +08:00
|
|
|
add_executable(sandbox2_sandbox2_test
|
2019-07-15 19:42:39 +08:00
|
|
|
sandbox2_test.cc
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
set_target_properties(sandbox2_sandbox2_test PROPERTIES
|
|
|
|
OUTPUT_NAME sandbox2_test
|
|
|
|
)
|
|
|
|
add_dependencies(sandbox2_sandbox2_test
|
2019-07-15 19:42:39 +08:00
|
|
|
sandbox2::testcase_abort
|
|
|
|
sandbox2::testcase_minimal
|
|
|
|
sandbox2::testcase_sleep
|
|
|
|
sandbox2::testcase_tsync
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
target_link_libraries(sandbox2_sandbox2_test PRIVATE
|
2023-08-24 21:23:03 +08:00
|
|
|
absl::status
|
|
|
|
absl::statusor
|
2019-07-15 19:42:39 +08:00
|
|
|
absl::strings
|
2023-08-24 21:23:03 +08:00
|
|
|
absl::synchronization
|
|
|
|
absl::time
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::config
|
2019-07-15 19:42:39 +08:00
|
|
|
sandbox2::sandbox2
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::testing
|
2019-07-15 19:42:39 +08:00
|
|
|
sapi::status_matchers
|
|
|
|
sapi::test_main
|
|
|
|
)
|
2020-12-15 01:15:40 +08:00
|
|
|
gtest_discover_tests_xcompile(sandbox2_sandbox2_test PROPERTIES
|
2019-07-15 19:42:39 +08:00
|
|
|
ENVIRONMENT "TEST_TMPDIR=/tmp"
|
|
|
|
ENVIRONMENT "TEST_SRCDIR=${PROJECT_BINARY_DIR}"
|
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:sanitizer_test
|
2020-12-14 17:13:03 +08:00
|
|
|
add_executable(sandbox2_sanitizer_test
|
2019-07-15 19:42:39 +08:00
|
|
|
sanitizer_test.cc
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
set_target_properties(sandbox2_sanitizer_test PROPERTIES
|
|
|
|
OUTPUT_NAME sanitizer_test
|
|
|
|
)
|
|
|
|
add_dependencies(sandbox2_sanitizer_test
|
2019-07-15 19:42:39 +08:00
|
|
|
sandbox2::testcase_sanitizer
|
2021-12-07 18:22:46 +08:00
|
|
|
sandbox2::testcase_close_fds
|
2019-07-15 19:42:39 +08:00
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
target_link_libraries(sandbox2_sanitizer_test PRIVATE
|
2019-07-15 19:42:39 +08:00
|
|
|
absl::strings
|
|
|
|
sandbox2::bpf_helper
|
|
|
|
sandbox2::client
|
|
|
|
sandbox2::comms
|
|
|
|
sandbox2::sandbox2
|
2020-04-08 04:26:15 +08:00
|
|
|
sandbox2::sanitizer
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::testing
|
2019-07-15 19:42:39 +08:00
|
|
|
sandbox2::util
|
|
|
|
sapi::status_matchers
|
|
|
|
sapi::test_main
|
|
|
|
)
|
2020-12-15 01:15:40 +08:00
|
|
|
gtest_discover_tests_xcompile(sandbox2_sanitizer_test PROPERTIES
|
2019-07-15 19:42:39 +08:00
|
|
|
ENVIRONMENT "TEST_TMPDIR=/tmp"
|
|
|
|
ENVIRONMENT "TEST_SRCDIR=${PROJECT_BINARY_DIR}"
|
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:util_test
|
2020-12-14 17:13:03 +08:00
|
|
|
add_executable(sandbox2_util_test
|
2019-07-15 19:42:39 +08:00
|
|
|
util_test.cc
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
set_target_properties(sandbox2_util_test PROPERTIES
|
|
|
|
OUTPUT_NAME util_test
|
|
|
|
)
|
|
|
|
target_link_libraries(sandbox2_util_test PRIVATE
|
2019-07-15 19:42:39 +08:00
|
|
|
sandbox2::util
|
2023-08-24 21:23:03 +08:00
|
|
|
absl::statusor
|
2023-03-14 15:03:33 +08:00
|
|
|
absl::strings
|
|
|
|
absl::cleanup
|
|
|
|
sapi::status_matchers
|
2019-07-15 19:42:39 +08:00
|
|
|
sapi::test_main
|
|
|
|
)
|
2020-12-15 01:15:40 +08:00
|
|
|
gtest_discover_tests_xcompile(sandbox2_util_test)
|
2019-07-15 19:42:39 +08:00
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:stack_trace_test
|
2020-12-14 17:13:03 +08:00
|
|
|
add_executable(sandbox2_stack_trace_test
|
2019-07-15 19:42:39 +08:00
|
|
|
stack_trace_test.cc
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
set_target_properties(sandbox2_stack_trace_test PROPERTIES
|
|
|
|
OUTPUT_NAME stack_trace_test
|
|
|
|
)
|
|
|
|
add_dependencies(sandbox2_stack_trace_test
|
2019-07-15 19:42:39 +08:00
|
|
|
sandbox2::testcase_symbolize
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
target_link_libraries(sandbox2_stack_trace_test PRIVATE
|
2023-08-24 21:23:03 +08:00
|
|
|
absl::check
|
2022-10-20 21:48:06 +08:00
|
|
|
absl::flags
|
2023-09-19 21:49:17 +08:00
|
|
|
absl::log_severity
|
|
|
|
absl::scoped_mock_log
|
2020-09-03 22:40:09 +08:00
|
|
|
absl::status
|
2019-07-15 19:42:39 +08:00
|
|
|
absl::strings
|
2023-03-02 17:25:02 +08:00
|
|
|
absl::time
|
2019-07-15 19:42:39 +08:00
|
|
|
sandbox2::global_forkserver
|
|
|
|
sandbox2::sandbox2
|
2023-02-16 21:06:50 +08:00
|
|
|
sandbox2::stack_trace
|
2022-10-20 21:48:06 +08:00
|
|
|
sandbox2::util
|
|
|
|
sapi::fileops
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::testing
|
2019-07-15 19:42:39 +08:00
|
|
|
sapi::status_matchers
|
|
|
|
sapi::test_main
|
|
|
|
)
|
2020-12-15 01:15:40 +08:00
|
|
|
gtest_discover_tests_xcompile(sandbox2_stack_trace_test PROPERTIES
|
2019-07-15 19:42:39 +08:00
|
|
|
ENVIRONMENT "TEST_TMPDIR=/tmp"
|
|
|
|
ENVIRONMENT "TEST_SRCDIR=${PROJECT_BINARY_DIR}"
|
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:ipc_test
|
2020-12-14 17:13:03 +08:00
|
|
|
add_executable(sandbox2_ipc_test
|
2019-07-15 19:42:39 +08:00
|
|
|
ipc_test.cc
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
set_target_properties(sandbox2_ipc_test PROPERTIES
|
|
|
|
OUTPUT_NAME ipc_test
|
|
|
|
)
|
|
|
|
add_dependencies(sandbox2_ipc_test
|
2019-07-15 19:42:39 +08:00
|
|
|
sandbox2::testcase_ipc
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
target_link_libraries(sandbox2_ipc_test PRIVATE
|
2019-07-15 19:42:39 +08:00
|
|
|
sandbox2::comms
|
2020-12-15 01:15:40 +08:00
|
|
|
sandbox2::ipc
|
2019-07-15 19:42:39 +08:00
|
|
|
sandbox2::sandbox2
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::testing
|
2019-07-15 19:42:39 +08:00
|
|
|
sapi::status_matchers
|
|
|
|
sapi::test_main
|
|
|
|
)
|
2020-12-15 01:15:40 +08:00
|
|
|
gtest_discover_tests_xcompile(sandbox2_ipc_test PROPERTIES
|
2019-07-15 19:42:39 +08:00
|
|
|
ENVIRONMENT "TEST_TMPDIR=/tmp"
|
|
|
|
ENVIRONMENT "TEST_SRCDIR=${PROJECT_BINARY_DIR}"
|
|
|
|
)
|
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:policybuilder_test
|
2020-12-14 17:13:03 +08:00
|
|
|
add_executable(sandbox2_policybuilder_test
|
2019-07-15 19:42:39 +08:00
|
|
|
policybuilder_test.cc
|
|
|
|
)
|
2020-12-14 17:13:03 +08:00
|
|
|
set_target_properties(sandbox2_policybuilder_test PROPERTIES
|
|
|
|
OUTPUT_NAME policybuilder_test
|
|
|
|
)
|
2020-12-15 01:15:40 +08:00
|
|
|
target_link_libraries(sandbox2_policybuilder_test
|
2022-10-12 20:22:51 +08:00
|
|
|
PRIVATE absl::strings
|
2023-03-06 16:27:06 +08:00
|
|
|
absl::log
|
|
|
|
absl::status
|
|
|
|
absl::statusor
|
2020-12-15 01:15:40 +08:00
|
|
|
sandbox2::bpf_helper
|
2023-09-05 22:13:06 +08:00
|
|
|
sandbox2::policy
|
2023-01-27 17:24:14 +08:00
|
|
|
sandbox2::policybuilder
|
2023-09-05 22:13:06 +08:00
|
|
|
sandbox2::violation_proto
|
2021-01-14 01:25:25 +08:00
|
|
|
sapi::testing
|
2020-12-15 01:15:40 +08:00
|
|
|
sapi::status_matchers
|
|
|
|
sapi::test_main
|
|
|
|
)
|
|
|
|
gtest_discover_tests_xcompile(sandbox2_policybuilder_test PROPERTIES
|
2019-07-15 19:42:39 +08:00
|
|
|
ENVIRONMENT "TEST_TMPDIR=/tmp"
|
|
|
|
ENVIRONMENT "TEST_SRCDIR=${PROJECT_BINARY_DIR}"
|
|
|
|
)
|
2023-03-07 21:03:22 +08:00
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:bpfdisassembler_test
|
|
|
|
add_executable(sandbox2_bpfdisassembler_test
|
|
|
|
bpfdisassembler_test.cc
|
|
|
|
)
|
|
|
|
set_target_properties(sandbox2_bpfdisassembler_test PROPERTIES
|
|
|
|
OUTPUT_NAME bpfdisassembler_test
|
|
|
|
)
|
|
|
|
target_link_libraries(sandbox2_bpfdisassembler_test
|
|
|
|
PRIVATE sandbox2::bpfdisassembler
|
|
|
|
sandbox2::bpf_helper
|
|
|
|
sapi::test_main
|
|
|
|
)
|
|
|
|
gtest_discover_tests_xcompile(sandbox2_bpfdisassembler_test PROPERTIES
|
|
|
|
ENVIRONMENT "TEST_TMPDIR=/tmp"
|
|
|
|
ENVIRONMENT "TEST_SRCDIR=${PROJECT_BINARY_DIR}"
|
|
|
|
)
|
2023-08-31 21:05:17 +08:00
|
|
|
|
|
|
|
# sandboxed_api/sandbox2:network_proxy_test
|
|
|
|
add_executable(sandbox2_network_proxy_test
|
|
|
|
network_proxy_test.cc
|
|
|
|
)
|
|
|
|
set_target_properties(sandbox2_network_proxy_test PROPERTIES
|
|
|
|
OUTPUT_NAME network_proxy_test
|
|
|
|
)
|
|
|
|
target_link_libraries(sandbox2_network_proxy_test
|
2023-09-05 17:16:47 +08:00
|
|
|
PRIVATE absl::status
|
|
|
|
absl::strings
|
2023-09-05 15:56:21 +08:00
|
|
|
absl::time
|
2023-08-31 21:05:17 +08:00
|
|
|
sandbox2::sandbox2
|
|
|
|
sandbox2::network_proxy_testing
|
|
|
|
sapi::status_matchers
|
|
|
|
sapi::testing
|
|
|
|
sapi::test_main
|
|
|
|
)
|
|
|
|
gtest_discover_tests_xcompile(sandbox2_bpfdisassembler_test PROPERTIES
|
|
|
|
ENVIRONMENT "TEST_TMPDIR=/tmp"
|
|
|
|
ENVIRONMENT "TEST_SRCDIR=${PROJECT_BINARY_DIR}"
|
|
|
|
)
|
|
|
|
|
2019-07-15 19:42:39 +08:00
|
|
|
endif()
|
2020-12-16 22:45:33 +08:00
|
|
|
|
|
|
|
configure_file(
|
|
|
|
"${PROJECT_SOURCE_DIR}/cmake/sandbox2.pc.in"
|
|
|
|
"${PROJECT_BINARY_DIR}/sandbox2.pc"
|
|
|
|
@ONLY
|
|
|
|
)
|
|
|
|
|
2021-01-14 01:25:25 +08:00
|
|
|
install(FILES "${PROJECT_BINARY_DIR}/sandbox2.pc"
|
|
|
|
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|