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("//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts") 16 17package(default_visibility = [ 18 "//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 "//sandboxed_api/sandbox2:comms", 31 "//sandboxed_api/util:fileops", 32 "@com_google_absl//absl/log", 33 "@com_google_absl//absl/status", 34 "@com_google_absl//absl/status:statusor", 35 ], 36) 37 38cc_library( 39 name = "client", 40 srcs = ["client.cc"], 41 hdrs = ["client.h"], 42 copts = sapi_platform_copts(), 43 visibility = ["//visibility:public"], 44 deps = [ 45 "//sandboxed_api/sandbox2:comms", 46 "//sandboxed_api/sandbox2/util:syscall_trap", 47 "//sandboxed_api/util:status", 48 "@com_google_absl//absl/log", 49 "@com_google_absl//absl/status", 50 "@com_google_absl//absl/synchronization", 51 ], 52) 53 54cc_library( 55 name = "filtering", 56 srcs = ["filtering.cc"], 57 hdrs = ["filtering.h"], 58 copts = sapi_platform_copts(), 59 deps = [ 60 "//sandboxed_api/sandbox2:comms", 61 "//sandboxed_api/util:status", 62 "@com_google_absl//absl/log", 63 "@com_google_absl//absl/status", 64 "@com_google_absl//absl/status:statusor", 65 "@com_google_absl//absl/strings", 66 ], 67) 68 69cc_test( 70 name = "filtering_test", 71 srcs = ["filtering_test.cc"], 72 copts = sapi_platform_copts(), 73 deps = [ 74 ":filtering", 75 "//sandboxed_api/util:status_matchers", 76 "@com_google_absl//absl/log:check", 77 "@com_google_googletest//:gtest_main", 78 ], 79) 80 81cc_library( 82 name = "testing", 83 srcs = ["testing.cc"], 84 hdrs = ["testing.h"], 85 deps = [ 86 "//sandboxed_api/util:fileops", 87 "//sandboxed_api/util:status", 88 "@com_google_absl//absl/base:core_headers", 89 "@com_google_absl//absl/log:check", 90 "@com_google_absl//absl/memory", 91 "@com_google_absl//absl/status", 92 "@com_google_absl//absl/status:statusor", 93 "@com_google_absl//absl/strings", 94 ], 95) 96