1# Copyright 2019 Google LLC. All Rights Reserved. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# https://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15load("@com_google_sandboxed_api//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts") 16 17package(default_visibility = [ 18 "@com_google_sandboxed_api//sandboxed_api/sandbox2:__subpackages__", 19]) 20 21licenses(["notice"]) 22 23cc_library( 24 name = "server", 25 srcs = ["server.cc"], 26 hdrs = ["server.h"], 27 copts = sapi_platform_copts(), 28 deps = [ 29 ":filtering", 30 "@com_google_absl//absl/functional:any_invocable", 31 "@com_google_absl//absl/log", 32 "@com_google_absl//absl/status", 33 "@com_google_absl//absl/status:statusor", 34 "@com_google_sandboxed_api//sandboxed_api/sandbox2:comms", 35 "@com_google_sandboxed_api//sandboxed_api/util:fileops", 36 ], 37) 38 39cc_library( 40 name = "client", 41 srcs = ["client.cc"], 42 hdrs = ["client.h"], 43 copts = sapi_platform_copts(), 44 visibility = ["//visibility:public"], 45 deps = [ 46 "@com_google_absl//absl/base:core_headers", 47 "@com_google_absl//absl/log", 48 "@com_google_absl//absl/status", 49 "@com_google_absl//absl/status:statusor", 50 "@com_google_absl//absl/synchronization", 51 "@com_google_sandboxed_api//sandboxed_api/sandbox2:comms", 52 "@com_google_sandboxed_api//sandboxed_api/sandbox2/util:syscall_trap", 53 "@com_google_sandboxed_api//sandboxed_api/util:fileops", 54 "@com_google_sandboxed_api//sandboxed_api/util:status", 55 ], 56) 57 58cc_library( 59 name = "filtering", 60 srcs = ["filtering.cc"], 61 hdrs = ["filtering.h"], 62 copts = sapi_platform_copts(), 63 deps = [ 64 "@com_google_absl//absl/log", 65 "@com_google_absl//absl/status", 66 "@com_google_absl//absl/status:statusor", 67 "@com_google_absl//absl/strings", 68 "@com_google_sandboxed_api//sandboxed_api/sandbox2:comms", 69 "@com_google_sandboxed_api//sandboxed_api/util:status", 70 ], 71) 72 73cc_test( 74 name = "filtering_test", 75 srcs = ["filtering_test.cc"], 76 copts = sapi_platform_copts(), 77 deps = [ 78 ":filtering", 79 "@com_google_absl//absl/log:check", 80 "@com_google_googletest//:gtest_main", 81 "@com_google_sandboxed_api//sandboxed_api/util:status_matchers", 82 ], 83) 84 85cc_library( 86 name = "testing", 87 srcs = ["testing.cc"], 88 hdrs = ["testing.h"], 89 copts = sapi_platform_copts(), 90 deps = [ 91 "@com_google_absl//absl/base:core_headers", 92 "@com_google_absl//absl/log:check", 93 "@com_google_absl//absl/memory", 94 "@com_google_absl//absl/status", 95 "@com_google_absl//absl/status:statusor", 96 "@com_google_absl//absl/strings", 97 "@com_google_sandboxed_api//sandboxed_api/util:fileops", 98 "@com_google_sandboxed_api//sandboxed_api/util:status", 99 "@com_google_sandboxed_api//sandboxed_api/util:thread", 100 ], 101) 102