1# Copyright (c) 2023 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##################
15## Type define: ##
16##################
17type hilog, native_system_domain, domain;
18type hilog_private_param, parameter_attr;
19
20debug_only(`
21    allow hilog hilog_private_param:parameter_service { set };
22')
23
24allow hilog proc_file:file { open read };
25allow hilog musl_param:file { open read map };
26allow hilog dev_unix_socket:dir { search };
27allow hilog hilog_control_socket:sock_file { write };
28allow hilog hilogd:unix_stream_socket { connectto };
29allow hilog paramservice_socket:sock_file { write };
30allow hilog kernel:unix_stream_socket { connectto };
31allow hilog hilog_param:parameter_service { set };
32allow domain hilog_param:file { read map open };
33allow domain hilog_private_param:file { read map open };
34
35neverallow ~{ hilog hilogd } hilog_private_param:parameter_service { set };
36