blob: 3424e0b1d4fc674f41e696b1a35b1799a5fa263b [file] [log] [blame]
Jaihind Yadavc6503382019-01-25 15:44:50 +05301# Copyright (c) 2019, The Linux Foundation. All rights reserved.
Sridhar Parasuramc997f652018-01-25 10:31:03 -08002#
3# Redistribution and use in source and binary forms, with or without
4# modification, are permitted provided that the following conditions are
5# met:
6# * Redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer.
8# * Redistributions in binary form must reproduce the above
9# copyright notice, this list of conditions and the following
10# disclaimer in the documentation and/or other materials provided
11# with the distribution.
12# * Neither the name of The Linux Foundation nor the names of its
13# contributors may be used to endorse or promote products derived
14# from this software without specific prior written permission.
15#
16# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
Jaihind Yadavc6503382019-01-25 15:44:50 +053028type qti, domain;
29type qti_exec, exec_type, vendor_file_type, file_type;
30init_daemon_domain(qti)
31net_domain(qti)
Sridhar Parasuramc997f652018-01-25 10:31:03 -080032
Jaihind Yadavc6503382019-01-25 15:44:50 +053033allow qti {
34 rmnet_device
35 smem_log_device
36 mhi_device
37 smd_device
38 userdebug_or_eng(`kmsg_device')
39}:chr_file rw_file_perms;
Sridhar Parasuramc997f652018-01-25 10:31:03 -080040
Jaihind Yadavc6503382019-01-25 15:44:50 +053041qmux_socket(qti)
Sridhar Parasuramc997f652018-01-25 10:31:03 -080042
Jaihind Yadavc6503382019-01-25 15:44:50 +053043allow qti self:{
44 netlink_socket
45 socket
46 udp_socket
47 qipcrtr_socket
48} create_socket_perms_no_ioctl;
49
50allow qti self:socket ioctl;
51allowxperm qti self:{ socket qipcrtr_socket } ioctl msm_sock_ipc_ioctls;
52allow qti vendor_shell_exec:file rx_file_perms;
53
54allow qti sysfs_data:file r_file_perms;
55
56# Allow write permissions for log file
57allow qti vendor_qti_data_file:file create_file_perms;
58allow qti vendor_qti_data_file:dir rw_dir_perms;
59
60#diag
61userdebug_or_eng(`
62 diag_use(qti)
63')
Aman Guptacacf28c2019-03-08 13:22:45 +053064
65#Allow qti to create qti socket
66allow qti dataqti_socket:sock_file rw_file_perms;