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
14developer_only(`
15(allow sh aa (process (transition siginh rlimitinh)))
16(allow sh aa_exec (file (ioctl read getattr map execute open)))
17(allow sh bm (process (transition siginh rlimitinh)))
18(allow sh bm_exec (file (ioctl read getattr map execute open)))
19(allow sh bytrace (process (transition siginh rlimitinh)))
20(allow sh bytrace_exec (file (ioctl read getattr map execute open)))
21(allow sh data_file (dir (getattr search)))
22(allow sh data_log (dir (search)))
23(allow sh data_hilogd_file (dir (ioctl read getattr lock open watch watch_reads search)))
24(allow sh data_hilogd_file (file (ioctl read getattr lock map open watch watch_reads)))
25(allow sh data_local (dir (ioctl read getattr lock open watch watch_reads search)))
26(allow sh data_local_tmp (dir (ioctl read write create getattr setattr lock rename open watch watch_reads add_name remove_name reparent search rmdir)))
27(allow sh data_local_tmp (file (execute execute_no_trans ioctl read write create getattr setattr lock append map unlink rename open watch watch_reads)))
28(allow sh debug_param (file (read map open)))
29(allow sh debug_param (parameter_service (set)))
30(allow sh dev_console_file (chr_file (read write getattr)))
31(allow sh dev_file (dir (search)))
32(allow sh dev_null_file (chr_file (read write open)))
33(allow sh dev_parameters_file (dir (search)))
34(allow sh dev_parameters_file (file (ioctl read getattr lock map open watch watch_reads)))
35(allow sh dev_unix_file (dir (search)))
36(allow sh dev_unix_socket (dir (search)))
37(allow sh developtools_hdc_control_param (file (read map open)))
38(allow sh devpts (chr_file (ioctl read write getattr)))
39(allow sh domain (dir (getattr search)))
40(allow sh domain (file (read open)))
41(allow sh domain (process (getattr)))
42(allow sh edm (process (transition getattr siginh rlimitinh)))
43(allow sh edm_exec (file (getattr read ioctl open map execute)))
44(allow sh etc_file (lnk_file (read)))
45(allow sh hdcd (fd (use)))
46(allow sh hdcd (fifo_file (ioctl read write)))
47(allow sh hdcd (unix_stream_socket (read write)))
48(allow sh hidumper (process (transition siginh rlimitinh)))
49(allow sh hidumper_exec (file (ioctl read getattr map execute open)))
50(allow sh hilog_control_socket (sock_file (write)))
51(allow sh hilog_exec (file (read getattr map execute open execute_no_trans)))
52(allow sh hilog_input_socket (sock_file (write)))
53(allow sh hilog_output_socket (sock_file (write)))
54(allow sh hilog_param (file (read map open)))
55(allow sh hilog_param (parameter_service (set)))
56(allow sh hilogd (unix_dgram_socket (sendto)))
57(allow sh hilogd (unix_stream_socket (connectto)))
58(allow sh hiperf (process (transition siginh rlimitinh)))
59(allow sh hiperf_exec (file (ioctl read getattr map execute open)))
60(allow sh hiprofiler_cmd (process (transition siginh rlimitinh)))
61(allow sh hiprofiler_cmd_exec (file (ioctl read getattr map execute open)))
62(allow sh hisysevent (process (transition siginh rlimitinh)))
63(allow sh hisysevent_exec (file (ioctl read getattr map execute open)))
64(allow sh hitrace (process (transition siginh rlimitinh)))
65(allow sh hitrace_exec (file (ioctl read getattr map execute open)))
66(allow sh kernel (unix_stream_socket (connectto)))
67(allow sh lib_file (lnk_file (read)))
68(allow sh paramservice_socket (sock_file (write)))
69(allow sh proc_file (dir (read getattr open search)))
70(allow sh proc_file (lnk_file (read getattr)))
71(allow sh proc_net (file (read open getattr)))
72(allow sh processdump (process (transition sigchld share siginh rlimitinh)))
73(allow sh processdump_exec (file (ioctl read getattr map execute open)))
74(allow sh rootfs (dir (search)))
75(allow sh rootfs (lnk_file (read)))
76(allow sh self (dir (ioctl read getattr lock open watch watch_reads search)))
77(allow sh self (fd (use)))
78(allow sh self (fifo_file (ioctl read write getattr lock append map open watch watch_reads)))
79(allow sh self (file (ioctl read write getattr lock append map open watch watch_reads)))
80(allow sh self (lnk_file (ioctl read getattr lock map open watch watch_reads)))
81(allow sh self (process (fork sigchld sigkill sigstop signull signal getsched setsched getsession getpgid setpgid getcap setcap getattr setrlimit)))
82(allow sh self (unix_dgram_socket (write create connect)))
83(allow sh self (unix_stream_socket (read write create connect setopt)))
84(allow sh selinuxfs (filesystem (getattr)))
85(allow sh servicectrl_reboot_param (parameter_service (set)))
86(allow sh sh_exec (file (read getattr map execute open entrypoint)))
87(allow sh sys_file (dir (search)))
88(allow sh system_bin_file (dir (read getattr open search)))
89(allow sh system_bin_file (file (read getattr map execute open execute_no_trans)))
90(allow sh system_bin_file (lnk_file (read)))
91(allow sh toybox_exec (file (read getattr map execute open execute_no_trans)))
92(allow sh toybox_exec (lnk_file (read)))
93(allow sh system_etc_file (dir (search)))
94(allow sh system_etc_file (file (read getattr open map)))
95(allow sh sysfs_net (dir (search)))
96(allow sh sysfs_net (lnk_file (read)))
97(allow sh proc_net_tcp_udp (file (getattr)))
98(allow sh system_file (dir (search)))
99(allow sh system_lib_file (file (read getattr map execute open)))
100(allow sh tty_device (chr_file (ioctl read write getattr open)))
101(allow sh vendor_lib_file (dir (search)))
102(allow sh time_param (file (read map open)))
103(allow sh vendor_file (dir (search)))
104(allow sh system_lib_file (dir (search)))
105(allow sh hichecker_writable_param (parameter_service (set)))
106(allow sh arkui_param (parameter_service (set)))
107(allow sh devinfo_public_param (file (map open read)))
108(allow sh devinfo_type_param (file (map open read)))
109(allow sh ark_profile (parameter_service (set)))
110(allow sh ark_writeable_param (parameter_service (set)))
111(allow sh SP_daemon (process (transition siginh rlimitinh)))
112(allow sh SP_daemon_exec (file (ioctl read getattr map execute open)))
113(allow sh atm (process (transition siginh rlimitinh)))
114(allow sh atm_exec (file (ioctl read getattr map execute open)))
115(allow sh uitest (process (transition siginh rlimitinh sigkill)))
116(allow sh uitest_exec (file (ioctl read getattr map execute open)))
117(allow sh wukong (process (transition siginh rlimitinh)))
118(allow sh wukong_exec (file (ioctl read getattr map execute open)))
119(allow sh snapshot_display (process (siginh transition rlimitinh getattr)))
120(allow sh snapshot_display_exec (file (read map execute getattr open ioctl)))
121(allow sh uinput (process (transition rlimitinh siginh getattr)))
122(allow sh uinput_exec (file (open map getattr ioctl read execute)))
123(allow sh lldb_server_file (dir (create setattr getattr add_name open write remove_name read search rmdir)))
124(allow sh lldb_server_file (file (open unlink create write setattr read getattr append)))
125(allow sh power_shell (process (transition siginh rlimitinh getattr)))
126(allow sh power_shell_exec (file (open map read ioctl execute getattr)))
127(allow sh power_shell (lnk_file (read)))
128(allow sh tmpfs (dir (search read open getattr)))
129(allow sh hmdfs (dir (search read open getattr write remove_name rmdir)))
130(allow sh hmdfs (file (write read map create rename append open getattr unlink)))
131(allow sh data_service_el2_hmdfs (dir (search read open getattr)))
132(allow sh data_user_file (dir (write read add_name create rename open getattr search remove_name rmdir)))
133(allow sh data_user_file (file (write read map create rename append open getattr unlink)))
134(allow sh data_file (dir (search)))
135(allow sh data_app_file (dir (search)))
136(allow sh data_app_el1_file (dir (search)))
137(allow sh data_app_el2_file (dir (search)))
138(allow sh data_app_el3_file (dir (search)))
139(allow sh data_app_el4_file (dir (search)))
140(allow sh debug_hap_data_file (dir (search getattr read open)))
141(allow sh debug_hap_data_file (file (getattr read open)))
142
143(allow sh system_file (dir (search)))
144(allow sh system_fonts_file (dir (getattr search read open)))
145(allow sh system_fonts_file (file (getattr read open)))
146(allow sh sh (udp_socket (connect create ioctl bind read write)))
147(allow sh sh (tcp_socket (connect create setopt getattr read write)))
148(allow sh sh (icmp_socket (create setopt write read bind)))
149(allow sh sh (rawip_socket (create setopt write read)))
150(allow sh dev_random_file (chr_file (read open)))
151(allow sh dnsproxy_service (sock_file (read open write)))
152(allow sh node (udp_socket (node_bind)))
153(allow sh node (icmp_socket (node_bind)))
154(allow sh netsysnative (unix_stream_socket (connectto)))
155(allow sh proc_net (lnk_file (read)))
156(allow sh port (tcp_socket (name_connect)))
157(allow sh kernel (key (search)))
158(allow sh mediatool (process (getattr rlimitinh transition siginh)))
159(allow sh mediatool_exec (file (execute read getattr ioctl map open)))
160(allow sh hnp_file (dir (search getattr read open)))
161(allow sh hnp_file (file (execute execute_no_trans read getattr map open ioctl)))
162(allow sh hnp_file (lnk_file (read)))
163(allow sh key_enable (key (search)))
164(allow sh storage_daemon (key (search)))
165(allow sh cem_exec (file (execute map open getattr ioctl read)))
166(allow sh cem (process (getattr rlimitinh transition siginh)))
167(allow sh i18n_param_tz_override (file (map open read)))
168(allow sh debug_hap (dir (read open)))
169(allow sh proc_stat_file (file (read open)))
170(allow sh proc_meminfo_file (file (read open)))
171(allow sh sysfs_devices_system_cpu (dir (read open)))
172(allow sh data_service_el1_i18n_timezone_file (dir (search)))
173(allow sh data_service_el1_i18n_timezone_file (file (open read getattr map)))
174(allow sh data_local_tmp (fifo_file (create getattr read unlink)))
175(allow sh dev_pts_file (dir (search)))
176(allow sh dev_encaps (chr_file (create getattr read unlink open)))
177(allow sh data_local_tmp (lnk_file (create getattr read unlink)))
178(allow sh sh_exec (file (execute_no_trans execute open read getattr unlink)))
179(allow sh labeledfs (filesystem (getattr)))
180(allow sh hnp_native (process (noatsecure getattr siginh rlimitinh transition)))
181(allow sh hnp_native (process2 (nosuid_transition)))
182(allow sh devicedebug (process (siginh getattr rlimitinh transition)))
183(allow sh devicedebug_exec (file (execute_no_trans open read map getattr execute ioctl)))
184')
185