# Copyright (c) 2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. init_daemon_domain(cupsd); allow cupsd data_file:dir { search }; allow cupsd system_bin_file:dir { search getattr }; allow cupsd system_bin_file:file { entrypoint execute execute_no_trans getattr map read open }; allow cupsd cupsd_exec:file { entrypoint execute map read }; allow cupsd cupsd:tcp_socket { accept bind connect create getattr listen read setopt write }; allow cupsd data_local:dir { search }; allow cupsd data_local_tmp:dir { getattr }; allow cupsd dev_unix_socket:dir { search }; allow cupsd musl_param:file { map open read }; allow cupsd debug_param:file { map open read }; allow cupsd netsysnative:unix_stream_socket { connectto }; allow cupsd node:tcp_socket { node_bind }; allow cupsd port:tcp_socket { name_bind name_connect }; allow cupsd proc_file:file { open read }; allow cupsd sysfs_devices_system_cpu:file { getattr open read }; allow cupsd cupsd:udp_socket { create setopt }; allow cupsd data_service_el1_file:dir { open read add_name remove_name search write create getattr setattr }; allow cupsd data_service_el1_file:file { append open create getattr read rename setattr write open map unlink }; allow cupsd data_service_file:dir { search }; allow cupsd proc_cpuinfo_file:file { getattr open read }; allow cupsd dev_console_file:chr_file { read write };