Tri Vo | a5cfd3e | 2018-03-22 11:35:02 -0700 | [diff] [blame] | 1 | // Copyright (C) 2018 The Android Open Source Project |
| 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 | // http://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 | |
Jeff Vander Stoep | ecd288f | 2019-02-15 12:18:15 -0800 | [diff] [blame] | 15 | cc_defaults { name: "selinux_policy_version", cflags: ["-DSEPOLICY_VERSION=30"], } |
| 16 | |
Tri Vo | 84e247a | 2018-03-25 20:03:58 -0700 | [diff] [blame] | 17 | se_filegroup { |
| 18 | name: "26.0.board.compat.map", |
| 19 | srcs: [ |
| 20 | "compat/26.0/26.0.cil", |
| 21 | ], |
| 22 | } |
| 23 | |
| 24 | se_filegroup { |
| 25 | name: "27.0.board.compat.map", |
| 26 | srcs: [ |
| 27 | "compat/27.0/27.0.cil", |
| 28 | ], |
| 29 | } |
| 30 | |
Jae Shin | 1fa9634 | 2018-07-11 18:30:44 +0900 | [diff] [blame] | 31 | se_filegroup { |
| 32 | name: "28.0.board.compat.map", |
| 33 | srcs: [ |
| 34 | "compat/28.0/28.0.cil", |
| 35 | ], |
| 36 | } |
| 37 | |
Jinguang Dong | e012569 | 2019-03-05 17:20:54 +0800 | [diff] [blame] | 38 | se_filegroup { |
Tri Vo | 50aa029 | 2019-06-01 17:04:13 -0700 | [diff] [blame] | 39 | name: "29.0.board.compat.map", |
| 40 | srcs: [ |
| 41 | "compat/29.0/29.0.cil", |
| 42 | ], |
| 43 | } |
| 44 | |
| 45 | se_filegroup { |
Inseob Kim | ace36ab | 2020-05-07 20:19:05 +0900 | [diff] [blame] | 46 | name: "30.0.board.compat.map", |
| 47 | srcs: [ |
| 48 | "compat/30.0/30.0.cil", |
| 49 | ], |
| 50 | } |
| 51 | |
| 52 | se_filegroup { |
Jinguang Dong | e012569 | 2019-03-05 17:20:54 +0800 | [diff] [blame] | 53 | name: "26.0.board.ignore.map", |
| 54 | srcs: [ |
| 55 | "compat/26.0/26.0.ignore.cil", |
| 56 | ], |
| 57 | } |
| 58 | |
| 59 | se_filegroup { |
| 60 | name: "27.0.board.ignore.map", |
| 61 | srcs: [ |
| 62 | "compat/27.0/27.0.ignore.cil", |
| 63 | ], |
| 64 | } |
| 65 | |
| 66 | se_filegroup { |
| 67 | name: "28.0.board.ignore.map", |
| 68 | srcs: [ |
| 69 | "compat/28.0/28.0.ignore.cil", |
| 70 | ], |
| 71 | } |
| 72 | |
Tri Vo | 50aa029 | 2019-06-01 17:04:13 -0700 | [diff] [blame] | 73 | se_filegroup { |
| 74 | name: "29.0.board.ignore.map", |
| 75 | srcs: [ |
| 76 | "compat/29.0/29.0.ignore.cil", |
| 77 | ], |
| 78 | } |
| 79 | |
Inseob Kim | ace36ab | 2020-05-07 20:19:05 +0900 | [diff] [blame] | 80 | se_filegroup { |
| 81 | name: "30.0.board.ignore.map", |
| 82 | srcs: [ |
| 83 | "compat/30.0/30.0.ignore.cil", |
| 84 | ], |
| 85 | } |
| 86 | |
Tri Vo | a5cfd3e | 2018-03-22 11:35:02 -0700 | [diff] [blame] | 87 | se_cil_compat_map { |
Tri Vo | 6117855 | 2019-10-10 16:29:40 -0700 | [diff] [blame] | 88 | name: "plat_26.0.cil", |
| 89 | stem: "26.0.cil", |
Tri Vo | 438684b | 2018-09-29 17:47:10 -0700 | [diff] [blame] | 90 | bottom_half: [":26.0.board.compat.map"], |
Tri Vo | 6117855 | 2019-10-10 16:29:40 -0700 | [diff] [blame] | 91 | top_half: "plat_27.0.cil", |
Tri Vo | a5cfd3e | 2018-03-22 11:35:02 -0700 | [diff] [blame] | 92 | } |
| 93 | |
| 94 | se_cil_compat_map { |
Tri Vo | 6117855 | 2019-10-10 16:29:40 -0700 | [diff] [blame] | 95 | name: "plat_27.0.cil", |
| 96 | stem: "27.0.cil", |
Tri Vo | 438684b | 2018-09-29 17:47:10 -0700 | [diff] [blame] | 97 | bottom_half: [":27.0.board.compat.map"], |
Tri Vo | 6117855 | 2019-10-10 16:29:40 -0700 | [diff] [blame] | 98 | top_half: "plat_28.0.cil", |
Tri Vo | a5cfd3e | 2018-03-22 11:35:02 -0700 | [diff] [blame] | 99 | } |
Jae Shin | 1fa9634 | 2018-07-11 18:30:44 +0900 | [diff] [blame] | 100 | |
| 101 | se_cil_compat_map { |
Tri Vo | 6117855 | 2019-10-10 16:29:40 -0700 | [diff] [blame] | 102 | name: "plat_28.0.cil", |
| 103 | stem: "28.0.cil", |
Tri Vo | 438684b | 2018-09-29 17:47:10 -0700 | [diff] [blame] | 104 | bottom_half: [":28.0.board.compat.map"], |
Tri Vo | 6117855 | 2019-10-10 16:29:40 -0700 | [diff] [blame] | 105 | top_half: "plat_29.0.cil", |
Tri Vo | 50aa029 | 2019-06-01 17:04:13 -0700 | [diff] [blame] | 106 | } |
| 107 | |
| 108 | se_cil_compat_map { |
Tri Vo | 6117855 | 2019-10-10 16:29:40 -0700 | [diff] [blame] | 109 | name: "plat_29.0.cil", |
| 110 | stem: "29.0.cil", |
Tri Vo | 50aa029 | 2019-06-01 17:04:13 -0700 | [diff] [blame] | 111 | bottom_half: [":29.0.board.compat.map"], |
Inseob Kim | ace36ab | 2020-05-07 20:19:05 +0900 | [diff] [blame] | 112 | top_half: "plat_30.0.cil", |
| 113 | } |
| 114 | |
| 115 | se_cil_compat_map { |
| 116 | name: "plat_30.0.cil", |
| 117 | stem: "30.0.cil", |
| 118 | bottom_half: [":30.0.board.compat.map"], |
| 119 | // top_half: "plat_31.0.cil", |
Tri Vo | 6117855 | 2019-10-10 16:29:40 -0700 | [diff] [blame] | 120 | } |
| 121 | |
| 122 | se_cil_compat_map { |
| 123 | name: "system_ext_26.0.cil", |
| 124 | stem: "26.0.cil", |
| 125 | bottom_half: [":26.0.board.compat.map"], |
| 126 | top_half: "system_ext_27.0.cil", |
| 127 | system_ext_specific: true, |
| 128 | } |
| 129 | |
| 130 | se_cil_compat_map { |
| 131 | name: "system_ext_27.0.cil", |
| 132 | stem: "27.0.cil", |
| 133 | bottom_half: [":27.0.board.compat.map"], |
| 134 | top_half: "system_ext_28.0.cil", |
| 135 | system_ext_specific: true, |
| 136 | } |
| 137 | |
| 138 | se_cil_compat_map { |
| 139 | name: "system_ext_28.0.cil", |
| 140 | stem: "28.0.cil", |
| 141 | bottom_half: [":28.0.board.compat.map"], |
| 142 | top_half: "system_ext_29.0.cil", |
| 143 | system_ext_specific: true, |
| 144 | } |
| 145 | |
| 146 | se_cil_compat_map { |
| 147 | name: "system_ext_29.0.cil", |
| 148 | stem: "29.0.cil", |
| 149 | bottom_half: [":29.0.board.compat.map"], |
Inseob Kim | ace36ab | 2020-05-07 20:19:05 +0900 | [diff] [blame] | 150 | top_half: "system_ext_30.0.cil", |
| 151 | system_ext_specific: true, |
| 152 | } |
| 153 | |
| 154 | se_cil_compat_map { |
| 155 | name: "system_ext_30.0.cil", |
| 156 | stem: "30.0.cil", |
| 157 | bottom_half: [":30.0.board.compat.map"], |
| 158 | // top_half: "system_ext_31.0.cil", |
Tri Vo | 6117855 | 2019-10-10 16:29:40 -0700 | [diff] [blame] | 159 | system_ext_specific: true, |
| 160 | } |
| 161 | |
| 162 | se_cil_compat_map { |
| 163 | name: "product_26.0.cil", |
| 164 | stem: "26.0.cil", |
| 165 | bottom_half: [":26.0.board.compat.map"], |
| 166 | top_half: "product_27.0.cil", |
| 167 | product_specific: true, |
| 168 | } |
| 169 | |
| 170 | se_cil_compat_map { |
| 171 | name: "product_27.0.cil", |
| 172 | stem: "27.0.cil", |
| 173 | bottom_half: [":27.0.board.compat.map"], |
| 174 | top_half: "product_28.0.cil", |
| 175 | product_specific: true, |
| 176 | } |
| 177 | |
| 178 | se_cil_compat_map { |
| 179 | name: "product_28.0.cil", |
| 180 | stem: "28.0.cil", |
| 181 | bottom_half: [":28.0.board.compat.map"], |
| 182 | top_half: "product_29.0.cil", |
| 183 | product_specific: true, |
| 184 | } |
| 185 | |
| 186 | se_cil_compat_map { |
| 187 | name: "product_29.0.cil", |
| 188 | stem: "29.0.cil", |
| 189 | bottom_half: [":29.0.board.compat.map"], |
Inseob Kim | ace36ab | 2020-05-07 20:19:05 +0900 | [diff] [blame] | 190 | top_half: "product_30.0.cil", |
| 191 | product_specific: true, |
| 192 | } |
| 193 | |
| 194 | se_cil_compat_map { |
| 195 | name: "product_30.0.cil", |
| 196 | stem: "30.0.cil", |
| 197 | bottom_half: [":30.0.board.compat.map"], |
| 198 | // top_half: "product_31.0.cil", |
Tri Vo | 6117855 | 2019-10-10 16:29:40 -0700 | [diff] [blame] | 199 | product_specific: true, |
Tri Vo | 438684b | 2018-09-29 17:47:10 -0700 | [diff] [blame] | 200 | } |
| 201 | |
| 202 | se_cil_compat_map { |
| 203 | name: "26.0.ignore.cil", |
Jinguang Dong | e012569 | 2019-03-05 17:20:54 +0800 | [diff] [blame] | 204 | bottom_half: [":26.0.board.ignore.map"], |
Tri Vo | 438684b | 2018-09-29 17:47:10 -0700 | [diff] [blame] | 205 | top_half: "27.0.ignore.cil", |
| 206 | } |
| 207 | |
| 208 | se_cil_compat_map { |
| 209 | name: "27.0.ignore.cil", |
Jinguang Dong | e012569 | 2019-03-05 17:20:54 +0800 | [diff] [blame] | 210 | bottom_half: [":27.0.board.ignore.map"], |
Tri Vo | 438684b | 2018-09-29 17:47:10 -0700 | [diff] [blame] | 211 | top_half: "28.0.ignore.cil", |
| 212 | } |
| 213 | |
| 214 | se_cil_compat_map { |
| 215 | name: "28.0.ignore.cil", |
Jinguang Dong | e012569 | 2019-03-05 17:20:54 +0800 | [diff] [blame] | 216 | bottom_half: [":28.0.board.ignore.map"], |
Tri Vo | e381deb | 2019-06-12 15:52:30 -0700 | [diff] [blame] | 217 | top_half: "29.0.ignore.cil", |
Jae Shin | 1fa9634 | 2018-07-11 18:30:44 +0900 | [diff] [blame] | 218 | } |
Inseob Kim | b554e59 | 2019-04-15 20:10:46 +0900 | [diff] [blame] | 219 | |
Tri Vo | 50aa029 | 2019-06-01 17:04:13 -0700 | [diff] [blame] | 220 | se_cil_compat_map { |
| 221 | name: "29.0.ignore.cil", |
| 222 | bottom_half: [":29.0.board.ignore.map"], |
Inseob Kim | ace36ab | 2020-05-07 20:19:05 +0900 | [diff] [blame] | 223 | top_half: "30.0.ignore.cil", |
| 224 | } |
| 225 | |
| 226 | se_cil_compat_map { |
| 227 | name: "30.0.ignore.cil", |
| 228 | bottom_half: [":30.0.board.ignore.map"], |
| 229 | // top_half: "31.0.ignore.cil", |
Tri Vo | 50aa029 | 2019-06-01 17:04:13 -0700 | [diff] [blame] | 230 | } |
| 231 | |
Jeff Vander Stoep | 564e292 | 2019-05-02 13:48:44 -0700 | [diff] [blame] | 232 | prebuilt_etc { |
Tri Vo | 50aa029 | 2019-06-01 17:04:13 -0700 | [diff] [blame] | 233 | name: "26.0.compat.cil", |
| 234 | src: "private/compat/26.0/26.0.compat.cil", |
Jeff Vander Stoep | 564e292 | 2019-05-02 13:48:44 -0700 | [diff] [blame] | 235 | sub_dir: "selinux/mapping", |
| 236 | } |
| 237 | |
| 238 | prebuilt_etc { |
| 239 | name: "27.0.compat.cil", |
| 240 | src: "private/compat/27.0/27.0.compat.cil", |
| 241 | sub_dir: "selinux/mapping", |
| 242 | } |
| 243 | |
| 244 | prebuilt_etc { |
Tri Vo | 50aa029 | 2019-06-01 17:04:13 -0700 | [diff] [blame] | 245 | name: "28.0.compat.cil", |
| 246 | src: "private/compat/28.0/28.0.compat.cil", |
| 247 | sub_dir: "selinux/mapping", |
| 248 | } |
| 249 | |
| 250 | prebuilt_etc { |
| 251 | name: "29.0.compat.cil", |
| 252 | src: "private/compat/29.0/29.0.compat.cil", |
Jeff Vander Stoep | 564e292 | 2019-05-02 13:48:44 -0700 | [diff] [blame] | 253 | sub_dir: "selinux/mapping", |
| 254 | } |
| 255 | |
Inseob Kim | ace36ab | 2020-05-07 20:19:05 +0900 | [diff] [blame] | 256 | prebuilt_etc { |
| 257 | name: "30.0.compat.cil", |
| 258 | src: "private/compat/30.0/30.0.compat.cil", |
| 259 | sub_dir: "selinux/mapping", |
| 260 | } |
| 261 | |
Inseob Kim | b554e59 | 2019-04-15 20:10:46 +0900 | [diff] [blame] | 262 | se_filegroup { |
| 263 | name: "file_contexts_files", |
| 264 | srcs: ["file_contexts"], |
| 265 | } |
| 266 | |
| 267 | se_filegroup { |
| 268 | name: "file_contexts_asan_files", |
| 269 | srcs: ["file_contexts_asan"], |
| 270 | } |
| 271 | |
| 272 | se_filegroup { |
| 273 | name: "file_contexts_overlayfs_files", |
| 274 | srcs: ["file_contexts_overlayfs"], |
| 275 | } |
| 276 | |
| 277 | se_filegroup { |
| 278 | name: "hwservice_contexts_files", |
| 279 | srcs: ["hwservice_contexts"], |
| 280 | } |
| 281 | |
| 282 | se_filegroup { |
| 283 | name: "property_contexts_files", |
| 284 | srcs: ["property_contexts"], |
| 285 | } |
| 286 | |
| 287 | se_filegroup { |
| 288 | name: "service_contexts_files", |
| 289 | srcs: ["service_contexts"], |
| 290 | } |
| 291 | |
Janis Danisevskis | c40681f | 2020-07-25 13:02:29 -0700 | [diff] [blame] | 292 | se_filegroup { |
| 293 | name: "keystore2_key_contexts_files", |
| 294 | srcs: ["keystore2_key_contexts"], |
| 295 | } |
| 296 | |
Inseob Kim | b554e59 | 2019-04-15 20:10:46 +0900 | [diff] [blame] | 297 | file_contexts { |
| 298 | name: "plat_file_contexts", |
| 299 | srcs: [":file_contexts_files"], |
| 300 | product_variables: { |
| 301 | address_sanitize: { |
| 302 | srcs: [":file_contexts_asan_files"], |
| 303 | }, |
| 304 | debuggable: { |
| 305 | srcs: [":file_contexts_overlayfs_files"], |
| 306 | }, |
| 307 | }, |
| 308 | |
| 309 | flatten_apex: { |
| 310 | srcs: ["apex/*-file_contexts"], |
| 311 | }, |
| 312 | |
| 313 | recovery_available: true, |
| 314 | } |
| 315 | |
| 316 | file_contexts { |
| 317 | name: "vendor_file_contexts", |
| 318 | srcs: [":file_contexts_files"], |
| 319 | soc_specific: true, |
| 320 | recovery_available: true, |
| 321 | } |
| 322 | |
| 323 | file_contexts { |
Bowgo Tsai | 86a048d | 2019-09-09 22:04:06 +0800 | [diff] [blame] | 324 | name: "system_ext_file_contexts", |
| 325 | srcs: [":file_contexts_files"], |
| 326 | system_ext_specific: true, |
| 327 | recovery_available: true, |
| 328 | } |
| 329 | |
| 330 | file_contexts { |
Inseob Kim | b554e59 | 2019-04-15 20:10:46 +0900 | [diff] [blame] | 331 | name: "product_file_contexts", |
| 332 | srcs: [":file_contexts_files"], |
| 333 | product_specific: true, |
| 334 | recovery_available: true, |
| 335 | } |
| 336 | |
| 337 | file_contexts { |
| 338 | name: "odm_file_contexts", |
| 339 | srcs: [":file_contexts_files"], |
| 340 | device_specific: true, |
| 341 | recovery_available: true, |
| 342 | } |
| 343 | |
| 344 | hwservice_contexts { |
| 345 | name: "plat_hwservice_contexts", |
| 346 | srcs: [":hwservice_contexts_files"], |
| 347 | } |
| 348 | |
| 349 | hwservice_contexts { |
Bowgo Tsai | 241d36e | 2019-09-09 22:05:10 +0800 | [diff] [blame] | 350 | name: "system_ext_hwservice_contexts", |
| 351 | srcs: [":hwservice_contexts_files"], |
| 352 | system_ext_specific: true, |
| 353 | } |
| 354 | |
| 355 | hwservice_contexts { |
Inseob Kim | b554e59 | 2019-04-15 20:10:46 +0900 | [diff] [blame] | 356 | name: "product_hwservice_contexts", |
| 357 | srcs: [":hwservice_contexts_files"], |
| 358 | product_specific: true, |
| 359 | } |
| 360 | |
| 361 | hwservice_contexts { |
| 362 | name: "vendor_hwservice_contexts", |
| 363 | srcs: [":hwservice_contexts_files"], |
| 364 | reqd_mask: true, |
| 365 | soc_specific: true, |
| 366 | } |
| 367 | |
| 368 | hwservice_contexts { |
| 369 | name: "odm_hwservice_contexts", |
| 370 | srcs: [":hwservice_contexts_files"], |
| 371 | device_specific: true, |
| 372 | } |
| 373 | |
| 374 | property_contexts { |
| 375 | name: "plat_property_contexts", |
| 376 | srcs: [":property_contexts_files"], |
| 377 | recovery_available: true, |
| 378 | } |
| 379 | |
| 380 | property_contexts { |
Bowgo Tsai | 1864cd0 | 2019-09-09 18:09:22 +0800 | [diff] [blame] | 381 | name: "system_ext_property_contexts", |
| 382 | srcs: [":property_contexts_files"], |
| 383 | system_ext_specific: true, |
| 384 | recovery_available: true, |
| 385 | } |
| 386 | |
| 387 | property_contexts { |
Inseob Kim | b554e59 | 2019-04-15 20:10:46 +0900 | [diff] [blame] | 388 | name: "product_property_contexts", |
| 389 | srcs: [":property_contexts_files"], |
| 390 | product_specific: true, |
| 391 | recovery_available: true, |
| 392 | } |
| 393 | |
| 394 | property_contexts { |
| 395 | name: "vendor_property_contexts", |
| 396 | srcs: [":property_contexts_files"], |
| 397 | reqd_mask: true, |
| 398 | soc_specific: true, |
| 399 | recovery_available: true, |
| 400 | } |
| 401 | |
| 402 | property_contexts { |
| 403 | name: "odm_property_contexts", |
| 404 | srcs: [":property_contexts_files"], |
| 405 | device_specific: true, |
| 406 | recovery_available: true, |
| 407 | } |
| 408 | |
| 409 | service_contexts { |
| 410 | name: "plat_service_contexts", |
| 411 | srcs: [":service_contexts_files"], |
| 412 | } |
| 413 | |
| 414 | service_contexts { |
Bowgo Tsai | 9823116 | 2019-09-09 22:05:29 +0800 | [diff] [blame] | 415 | name: "system_ext_service_contexts", |
| 416 | srcs: [":service_contexts_files"], |
| 417 | system_ext_specific: true, |
| 418 | } |
| 419 | |
| 420 | service_contexts { |
Inseob Kim | b554e59 | 2019-04-15 20:10:46 +0900 | [diff] [blame] | 421 | name: "product_service_contexts", |
| 422 | srcs: [":service_contexts_files"], |
| 423 | product_specific: true, |
| 424 | } |
| 425 | |
| 426 | service_contexts { |
| 427 | name: "vendor_service_contexts", |
| 428 | srcs: [":service_contexts_files"], |
| 429 | reqd_mask: true, |
| 430 | soc_specific: true, |
| 431 | } |
yangbill | 3e34537 | 2020-04-15 13:55:47 +0800 | [diff] [blame] | 432 | |
Janis Danisevskis | c40681f | 2020-07-25 13:02:29 -0700 | [diff] [blame] | 433 | keystore2_key_contexts { |
| 434 | name: "plat_keystore2_key_contexts", |
| 435 | srcs: [":keystore2_key_contexts_files"], |
| 436 | } |
| 437 | |
| 438 | keystore2_key_contexts { |
| 439 | name: "system_keystore2_key_contexts", |
| 440 | srcs: [":keystore2_key_contexts_files"], |
| 441 | system_ext_specific: true, |
| 442 | } |
| 443 | |
| 444 | keystore2_key_contexts { |
| 445 | name: "product_keystore2_key_contexts", |
| 446 | srcs: [":keystore2_key_contexts_files"], |
| 447 | product_specific: true, |
| 448 | } |
| 449 | |
| 450 | keystore2_key_contexts { |
| 451 | name: "vendor_keystore2_key_contexts", |
| 452 | srcs: [":keystore2_key_contexts_files"], |
| 453 | reqd_mask: true, |
| 454 | soc_specific: true, |
| 455 | } |
| 456 | |
yangbill | 3e34537 | 2020-04-15 13:55:47 +0800 | [diff] [blame] | 457 | // For vts_treble_sys_prop_test |
| 458 | filegroup { |
| 459 | name: "private_property_contexts", |
| 460 | srcs: ["private/property_contexts"], |
| 461 | visibility: [ |
| 462 | "//test/vts-testcase/security/system_property", |
| 463 | ], |
| 464 | } |