xref: /aosp_15_r20/system/sepolicy/mac_permissions/Android.bp (revision e4a36f4174b17bbab9dc043f4a65dc8d87377290)
1*e4a36f41SAndroid Build Coastguard Worker// Copyright (C) 2022 The Android Open Source Project
2*e4a36f41SAndroid Build Coastguard Worker//
3*e4a36f41SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
4*e4a36f41SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
5*e4a36f41SAndroid Build Coastguard Worker// You may obtain a copy of the License at
6*e4a36f41SAndroid Build Coastguard Worker//
7*e4a36f41SAndroid Build Coastguard Worker//     http://www.apache.org/licenses/LICENSE-2.0
8*e4a36f41SAndroid Build Coastguard Worker//
9*e4a36f41SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
10*e4a36f41SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
11*e4a36f41SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*e4a36f41SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
13*e4a36f41SAndroid Build Coastguard Worker// limitations under the License.
14*e4a36f41SAndroid Build Coastguard Worker
15*e4a36f41SAndroid Build Coastguard Worker// This file contains module definitions for mac_permissions.xml files.
16*e4a36f41SAndroid Build Coastguard Worker
17*e4a36f41SAndroid Build Coastguard Workerpackage {
18*e4a36f41SAndroid Build Coastguard Worker    // See: http://go/android-license-faq
19*e4a36f41SAndroid Build Coastguard Worker    // A large-scale-change added 'default_applicable_licenses' to import
20*e4a36f41SAndroid Build Coastguard Worker    // all of the 'license_kinds' from "system_sepolicy_license"
21*e4a36f41SAndroid Build Coastguard Worker    // to get the below license kinds:
22*e4a36f41SAndroid Build Coastguard Worker    //   SPDX-license-identifier-Apache-2.0
23*e4a36f41SAndroid Build Coastguard Worker    default_applicable_licenses: ["system_sepolicy_license"],
24*e4a36f41SAndroid Build Coastguard Worker}
25*e4a36f41SAndroid Build Coastguard Worker
26*e4a36f41SAndroid Build Coastguard Workerse_build_files {
27*e4a36f41SAndroid Build Coastguard Worker    name: "keys.conf",
28*e4a36f41SAndroid Build Coastguard Worker    srcs: ["keys.conf"],
29*e4a36f41SAndroid Build Coastguard Worker}
30*e4a36f41SAndroid Build Coastguard Worker
31*e4a36f41SAndroid Build Coastguard Workerse_build_files {
32*e4a36f41SAndroid Build Coastguard Worker    name: "mac_permissions.xml",
33*e4a36f41SAndroid Build Coastguard Worker    srcs: ["mac_permissions.xml"],
34*e4a36f41SAndroid Build Coastguard Worker}
35*e4a36f41SAndroid Build Coastguard Worker
36*e4a36f41SAndroid Build Coastguard Workermac_permissions {
37*e4a36f41SAndroid Build Coastguard Worker    name: "plat_mac_permissions.xml",
38*e4a36f41SAndroid Build Coastguard Worker    keys: [
39*e4a36f41SAndroid Build Coastguard Worker        ":keys.conf{.plat_private}",
40*e4a36f41SAndroid Build Coastguard Worker        ":keys.conf{.system_ext_private}",
41*e4a36f41SAndroid Build Coastguard Worker        ":keys.conf{.product_private}",
42*e4a36f41SAndroid Build Coastguard Worker    ],
43*e4a36f41SAndroid Build Coastguard Worker    srcs: [":mac_permissions.xml{.plat_private}"],
44*e4a36f41SAndroid Build Coastguard Worker}
45*e4a36f41SAndroid Build Coastguard Worker
46*e4a36f41SAndroid Build Coastguard Workermac_permissions {
47*e4a36f41SAndroid Build Coastguard Worker    name: "system_ext_mac_permissions.xml",
48*e4a36f41SAndroid Build Coastguard Worker    keys: [
49*e4a36f41SAndroid Build Coastguard Worker        ":keys.conf{.system_ext_private}",
50*e4a36f41SAndroid Build Coastguard Worker        ":keys.conf{.reqd_mask}",
51*e4a36f41SAndroid Build Coastguard Worker    ],
52*e4a36f41SAndroid Build Coastguard Worker    srcs: [
53*e4a36f41SAndroid Build Coastguard Worker        ":mac_permissions.xml{.system_ext_private}",
54*e4a36f41SAndroid Build Coastguard Worker        ":mac_permissions.xml{.reqd_mask}",
55*e4a36f41SAndroid Build Coastguard Worker    ],
56*e4a36f41SAndroid Build Coastguard Worker    system_ext_specific: true,
57*e4a36f41SAndroid Build Coastguard Worker}
58*e4a36f41SAndroid Build Coastguard Worker
59*e4a36f41SAndroid Build Coastguard Workermac_permissions {
60*e4a36f41SAndroid Build Coastguard Worker    name: "product_mac_permissions.xml",
61*e4a36f41SAndroid Build Coastguard Worker    keys: [
62*e4a36f41SAndroid Build Coastguard Worker        ":keys.conf{.product_private}",
63*e4a36f41SAndroid Build Coastguard Worker        ":keys.conf{.reqd_mask}",
64*e4a36f41SAndroid Build Coastguard Worker    ],
65*e4a36f41SAndroid Build Coastguard Worker    srcs: [
66*e4a36f41SAndroid Build Coastguard Worker        ":mac_permissions.xml{.product_private}",
67*e4a36f41SAndroid Build Coastguard Worker        ":mac_permissions.xml{.reqd_mask}",
68*e4a36f41SAndroid Build Coastguard Worker    ],
69*e4a36f41SAndroid Build Coastguard Worker    product_specific: true,
70*e4a36f41SAndroid Build Coastguard Worker}
71*e4a36f41SAndroid Build Coastguard Worker
72*e4a36f41SAndroid Build Coastguard Workermac_permissions {
73*e4a36f41SAndroid Build Coastguard Worker    name: "vendor_mac_permissions.xml",
74*e4a36f41SAndroid Build Coastguard Worker    keys: [
75*e4a36f41SAndroid Build Coastguard Worker        ":keys.conf{.plat_vendor}",
76*e4a36f41SAndroid Build Coastguard Worker        ":keys.conf{.vendor}",
77*e4a36f41SAndroid Build Coastguard Worker        ":keys.conf{.reqd_mask}",
78*e4a36f41SAndroid Build Coastguard Worker    ],
79*e4a36f41SAndroid Build Coastguard Worker    srcs: [
80*e4a36f41SAndroid Build Coastguard Worker        ":mac_permissions.xml{.plat_vendor}",
81*e4a36f41SAndroid Build Coastguard Worker        ":mac_permissions.xml{.vendor}",
82*e4a36f41SAndroid Build Coastguard Worker        ":mac_permissions.xml{.reqd_mask}",
83*e4a36f41SAndroid Build Coastguard Worker    ],
84*e4a36f41SAndroid Build Coastguard Worker    vendor: true,
85*e4a36f41SAndroid Build Coastguard Worker}
86*e4a36f41SAndroid Build Coastguard Worker
87*e4a36f41SAndroid Build Coastguard Workermac_permissions {
88*e4a36f41SAndroid Build Coastguard Worker    name: "odm_mac_permissions.xml",
89*e4a36f41SAndroid Build Coastguard Worker    keys: [
90*e4a36f41SAndroid Build Coastguard Worker        ":keys.conf{.odm}",
91*e4a36f41SAndroid Build Coastguard Worker        ":keys.conf{.reqd_mask}",
92*e4a36f41SAndroid Build Coastguard Worker    ],
93*e4a36f41SAndroid Build Coastguard Worker    srcs: [
94*e4a36f41SAndroid Build Coastguard Worker        ":mac_permissions.xml{.odm}",
95*e4a36f41SAndroid Build Coastguard Worker        ":mac_permissions.xml{.reqd_mask}",
96*e4a36f41SAndroid Build Coastguard Worker    ],
97*e4a36f41SAndroid Build Coastguard Worker    device_specific: true,
98*e4a36f41SAndroid Build Coastguard Worker}
99