2020-02-20 23:45:22 +08:00
|
|
|
# Copyright 2019 Google LLC. All Rights Reserved.
|
|
|
|
#
|
|
|
|
# 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
|
2020-02-20 23:45:22 +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.
|
|
|
|
|
|
|
|
load("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts")
|
|
|
|
|
2023-06-07 17:22:31 +08:00
|
|
|
package(default_visibility = [
|
|
|
|
"//sandboxed_api/sandbox2:__subpackages__",
|
|
|
|
])
|
2020-02-20 23:45:22 +08:00
|
|
|
|
2022-02-03 23:09:37 +08:00
|
|
|
licenses(["notice"])
|
2020-02-20 23:45:22 +08:00
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "server",
|
|
|
|
srcs = ["server.cc"],
|
|
|
|
hdrs = ["server.h"],
|
|
|
|
copts = sapi_platform_copts(),
|
|
|
|
deps = [
|
|
|
|
":filtering",
|
|
|
|
"//sandboxed_api/sandbox2:comms",
|
2021-01-14 01:25:25 +08:00
|
|
|
"//sandboxed_api/util:fileops",
|
2022-10-20 21:48:06 +08:00
|
|
|
"@com_google_absl//absl/log",
|
2023-08-24 21:23:03 +08:00
|
|
|
"@com_google_absl//absl/status",
|
2020-09-02 23:46:48 +08:00
|
|
|
"@com_google_absl//absl/status:statusor",
|
2020-02-20 23:45:22 +08:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "client",
|
|
|
|
srcs = ["client.cc"],
|
|
|
|
hdrs = ["client.h"],
|
|
|
|
copts = sapi_platform_copts(),
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [
|
|
|
|
"//sandboxed_api/sandbox2:comms",
|
2022-11-30 21:47:09 +08:00
|
|
|
"//sandboxed_api/sandbox2/util:syscall_trap",
|
2020-02-20 23:45:22 +08:00
|
|
|
"//sandboxed_api/util:status",
|
2022-10-20 21:48:06 +08:00
|
|
|
"@com_google_absl//absl/log",
|
2020-08-28 19:49:15 +08:00
|
|
|
"@com_google_absl//absl/status",
|
2020-02-20 23:45:22 +08:00
|
|
|
"@com_google_absl//absl/synchronization",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "filtering",
|
|
|
|
srcs = ["filtering.cc"],
|
|
|
|
hdrs = ["filtering.h"],
|
|
|
|
copts = sapi_platform_copts(),
|
|
|
|
deps = [
|
|
|
|
"//sandboxed_api/sandbox2:comms",
|
|
|
|
"//sandboxed_api/util:status",
|
2022-10-20 21:48:06 +08:00
|
|
|
"@com_google_absl//absl/log",
|
2020-08-28 19:49:15 +08:00
|
|
|
"@com_google_absl//absl/status",
|
2020-09-02 23:46:48 +08:00
|
|
|
"@com_google_absl//absl/status:statusor",
|
2020-02-20 23:45:22 +08:00
|
|
|
"@com_google_absl//absl/strings",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_test(
|
|
|
|
name = "filtering_test",
|
|
|
|
srcs = ["filtering_test.cc"],
|
|
|
|
copts = sapi_platform_copts(),
|
|
|
|
deps = [
|
|
|
|
":filtering",
|
|
|
|
"//sandboxed_api/util:status_matchers",
|
2022-10-20 21:48:06 +08:00
|
|
|
"@com_google_absl//absl/log:check",
|
2020-02-20 23:45:22 +08:00
|
|
|
"@com_google_googletest//:gtest_main",
|
|
|
|
],
|
|
|
|
)
|