github.com/SagerNet/gvisor@v0.0.0-20210707092255-7731c139d75c/pkg/sentry/kernel/auth/BUILD (about) 1 load("//tools:defs.bzl", "go_library") 2 load("//tools/go_generics:defs.bzl", "go_template_instance") 3 4 package(licenses = ["notice"]) 5 6 go_template_instance( 7 name = "atomicptr_credentials", 8 out = "atomicptr_credentials_unsafe.go", 9 package = "auth", 10 suffix = "Credentials", 11 template = "//pkg/sync/atomicptr:generic_atomicptr", 12 types = { 13 "Value": "Credentials", 14 }, 15 ) 16 17 go_template_instance( 18 name = "id_map_range", 19 out = "id_map_range.go", 20 package = "auth", 21 prefix = "idMap", 22 template = "//pkg/segment:generic_range", 23 types = { 24 "T": "uint32", 25 }, 26 ) 27 28 go_template_instance( 29 name = "id_map_set", 30 out = "id_map_set.go", 31 consts = { 32 "minDegree": "3", 33 }, 34 package = "auth", 35 prefix = "idMap", 36 template = "//pkg/segment:generic_set", 37 types = { 38 "Key": "uint32", 39 "Range": "idMapRange", 40 "Value": "uint32", 41 "Functions": "idMapFunctions", 42 }, 43 ) 44 45 go_library( 46 name = "auth", 47 srcs = [ 48 "atomicptr_credentials_unsafe.go", 49 "auth.go", 50 "capability_set.go", 51 "context.go", 52 "credentials.go", 53 "id.go", 54 "id_map.go", 55 "id_map_functions.go", 56 "id_map_range.go", 57 "id_map_set.go", 58 "user_namespace.go", 59 ], 60 marshal = True, 61 visibility = ["//pkg/sentry:internal"], 62 deps = [ 63 "//pkg/abi/linux", 64 "//pkg/bits", 65 "//pkg/context", 66 "//pkg/errors/linuxerr", 67 "//pkg/log", 68 "//pkg/sync", 69 "//pkg/syserror", 70 ], 71 )