已合并
feat: testserver网络控制命令SELinux策略 #8299
yangyuyan创建于 9月28日
feat: testserver网络控制命令SELinux策略 #8299
已合并
共 3 个文件变更+55-0
| @@ -0,0 +1,17 @@ | |||
| 1 | +# Copyright (c) 2026 Huawei Device Co., Ltd. | ||
| 2 | +# Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 3 | +# you may not use this file except in compliance with the License. | ||
| 4 | +# You may obtain a copy of the License at | ||
| 5 | +# | ||
| 6 | +# http://www.apache.org/licenses/LICENSE-2.0 | ||
| 7 | +# | ||
| 8 | +# Unless required by applicable law or agreed to in writing, software | ||
| 9 | +# distributed under the License is distributed on an "AS IS" BASIS, | ||
| 10 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 11 | +# See the License for the specific language governing permissions and | ||
| 12 | +# limitations under the License. | ||
| 13 | + | ||
| 14 | +developer_only(` | ||
| 15 | + # avc: denied { call } for pid=1158, comm="OS_IPC_0_1159" scontext=u:r:telephony_sa:s0 tcontext=u:r:test_server:s0 tclass=binder permissive=0 | ||
| 16 | + allow telephony_sa test_server:binder { call }; | ||
| 17 | +') | ||
| @@ -38,4 +38,25 @@ developer_only(` | |||
| 38 | allow test_server sa_location_locator_service:samgr_class { get }; | 38 | allow test_server sa_location_locator_service:samgr_class { get }; |
| 39 | # avc: denied { call } for pid=24150, comm="/system/bin/sa_main" scontext=u:r:test_server:s0 tcontext=u:r:locationhub:s0 tclass=binder permissive=1 | 39 | # avc: denied { call } for pid=24150, comm="/system/bin/sa_main" scontext=u:r:test_server:s0 tcontext=u:r:locationhub:s0 tclass=binder permissive=1 |
| 40 | allow test_server locationhub:binder { call }; | 40 | allow test_server locationhub:binder { call }; |
| 41 | + | ||
| 42 | + # avc: denied { get } for service=1120 sid=u:r:test_server:s0 scontext=u:r:test_server:s0 tcontext=u:r:sa_wifi_device_ability:s0 tclass=samgr_class permissive=0 | ||
| 43 | + allow test_server sa_wifi_device_ability:samgr_class { get }; | ||
| 44 | + | ||
| 45 | + # avc: denied { call } for pid=14842, comm="/system/bin/sa_main" scontext=u:r:test_server:s0 tcontext=u:r:wifi_manager_service:s0 tclass=binder permissive=0 | ||
| 46 | + allow test_server wifi_manager_service:binder { call transfer }; | ||
| 47 | + | ||
| 48 | + # avc: denied { get } for service=4007 sid=u:r:test_server:s0 scontext=u:r:test_server:s0 tcontext=u:r:sa_telephony_tel_cellular_data:s0 tclass=samgr_class permissive=0 | ||
| 49 | + allow test_server sa_telephony_tel_cellular_data:samgr_class { get }; | ||
| 50 | + | ||
| 51 | + # avc: denied { get } for service=4010 sid=u:r:test_server:s0 scontext=u:r:test_server:s0 tcontext=u:r:sa_telephony_tel_core_service:s0 tclass=samgr_class permissive=0 | ||
| 52 | + allow test_server sa_telephony_tel_core_service:samgr_class { get }; | ||
| 53 | + | ||
| 54 | + # avc: denied { call } for pid=1158, comm="/system/bin/sa_main" scontext=u:r:test_server:s0 tcontext=u:r:telephony_sa:s0 tclass=binder permissive=0 | ||
| 55 | + allow test_server telephony_sa:binder { call transfer }; | ||
| 56 | + | ||
| 57 | + # avc: denied { get } for service=1151 sid=u:r:test_server:s0 scontext=u:r:test_server:s0 tcontext=u:r:sa_net_conn_manager:s0 tclass=samgr_class permissive=0 | ||
| 58 | + allow test_server sa_net_conn_manager:samgr_class { get }; | ||
| 59 | + | ||
| 60 | + # avc: denied { call } for pid=3616, comm="/system/bin/sa_main" scontext=u:r:test_server:s0 tcontext=u:r:netmanager:s0 tclass=binder permissive=0 | ||
| 61 | + allow test_server netmanager:binder { call }; | ||
| 41 | ') | 62 | ') |
| @@ -0,0 +1,17 @@ | |||
| 1 | +# Copyright (c) 2026 Huawei Device Co., Ltd. | ||
| 2 | +# Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 3 | +# you may not use this file except in compliance with the License. | ||
| 4 | +# You may obtain a copy of the License at | ||
| 5 | +# | ||
| 6 | +# http://www.apache.org/licenses/LICENSE-2.0 | ||
| 7 | +# | ||
| 8 | +# Unless required by applicable law or agreed to in writing, software | ||
| 9 | +# distributed under the License is distributed on an "AS IS" BASIS, | ||
| 10 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 11 | +# See the License for the specific language governing permissions and | ||
| 12 | +# limitations under the License. | ||
| 13 | + | ||
| 14 | +developer_only(` | ||
| 15 | + # avc: denied { transfer } for pid=14842, comm="/system/bin/sa_main" scontext=u:r:wifi_manager_service:s0 tcontext=u:r:test_server:s0 tclass=binder permissive=0 | ||
| 16 | + allow wifi_manager_service test_server:binder { transfer }; | ||
| 17 | +') | ||