Merge "sepolicy : remove mdtpdaemon and mdtpservice_app references"
This commit is contained in:
		
				
					committed by
					
						
						Gerrit - the friendly Code Review server
					
				
			
			
				
	
			
			
			
					commit
					1bcf4ab545
				
			
							
								
								
									
										1
									
								
								legacy/vendor/common/file_contexts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								legacy/vendor/common/file_contexts
									
									
									
									
										vendored
									
									
								
							@@ -319,7 +319,6 @@
 | 
			
		||||
/(vendor|system/vendor)/bin/fstman              u:object_r:fstman_exec:s0
 | 
			
		||||
/(vendor|system/vendor)/bin/wigighalsvc         u:object_r:wigighalsvc_exec:s0
 | 
			
		||||
/(vendor|system/vendor)/bin/wigignpt            u:object_r:wigignpt_exec:s0
 | 
			
		||||
/(vendor|system/vendor)/bin/mdtpd               u:object_r:mdtpdaemon_exec:s0
 | 
			
		||||
/(vendor|system/vendor)/bin/wifi_ftmd           u:object_r:wifi_ftmd_exec:s0
 | 
			
		||||
/(vendor|system/vendor)/bin/fingerprint.qcom    u:object_r:fps_hal_exec:s0
 | 
			
		||||
/(vendor|system/vendor)/bin/hw/android\.hardware\.keymaster@3\.0-service-qti u:object_r:hal_keymaster_qti_exec:s0
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										74
									
								
								legacy/vendor/common/mdtp.te
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										74
									
								
								legacy/vendor/common/mdtp.te
									
									
									
									
										vendored
									
									
								
							@@ -1,74 +0,0 @@
 | 
			
		||||
# Copyright (c) 2015, The Linux Foundation. All rights reserved.
 | 
			
		||||
#
 | 
			
		||||
# Redistribution and use in source and binary forms, with or without
 | 
			
		||||
# modification, are permitted provided that the following conditions are
 | 
			
		||||
# met:
 | 
			
		||||
#     * Redistributions of source code must retain the above copyright
 | 
			
		||||
#       notice, this list of conditions and the following disclaimer.
 | 
			
		||||
#     * Redistributions in binary form must reproduce the above
 | 
			
		||||
#       copyright notice, this list of conditions and the following
 | 
			
		||||
#       disclaimer in the documentation and/or other materials provided
 | 
			
		||||
#       with the distribution.
 | 
			
		||||
#     * Neither the name of The Linux Foundation nor the names of its
 | 
			
		||||
#       contributors may be used to endorse or promote products derived
 | 
			
		||||
#       from this software without specific prior written permission.
 | 
			
		||||
#
 | 
			
		||||
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
 | 
			
		||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 | 
			
		||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
 | 
			
		||||
# ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
 | 
			
		||||
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 | 
			
		||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 | 
			
		||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
 | 
			
		||||
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 | 
			
		||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
 | 
			
		||||
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 | 
			
		||||
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 | 
			
		||||
 | 
			
		||||
type mdtpdaemon, domain;
 | 
			
		||||
type mdtpdaemon_exec, exec_type, vendor_file_type, file_type;
 | 
			
		||||
 | 
			
		||||
allow mdtpdaemon self:capability {
 | 
			
		||||
    setuid
 | 
			
		||||
    setgid
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
userdebug_or_eng(`
 | 
			
		||||
    #Needed for kill(pid, 0) existance test
 | 
			
		||||
    allow mdtpdaemon su:process signull;
 | 
			
		||||
    allow mdtpdaemon self:capability kill;
 | 
			
		||||
    diag_use(mdtpdaemon)
 | 
			
		||||
')
 | 
			
		||||
 | 
			
		||||
#Allow for transition from init domain to mdtpdaemon
 | 
			
		||||
init_daemon_domain(mdtpdaemon)
 | 
			
		||||
 | 
			
		||||
#Allow apps to interact with mdtpdaemon
 | 
			
		||||
binder_call(mdtpdaemon, platform_app)
 | 
			
		||||
 | 
			
		||||
#Allow access to firmware
 | 
			
		||||
r_dir_file(mdtpdaemon, firmware_file)
 | 
			
		||||
 | 
			
		||||
#Allow access to tee device
 | 
			
		||||
allow mdtpdaemon tee_device:chr_file rw_file_perms;
 | 
			
		||||
 | 
			
		||||
# Provide access to block devices
 | 
			
		||||
allow mdtpdaemon block_device:dir r_dir_perms;
 | 
			
		||||
allow mdtpdaemon mdtp_device:blk_file rw_file_perms;
 | 
			
		||||
allow mdtpdaemon system_block_device:blk_file r_file_perms;
 | 
			
		||||
 | 
			
		||||
# Provide access to QTI Crypto driver for MDTP
 | 
			
		||||
# allow mdtpdaemon qce_device:chr_file rw_file_perms;
 | 
			
		||||
 | 
			
		||||
# Provide read access to all /system files for MDTP file-to-block-mapping
 | 
			
		||||
r_dir_file(mdtpdaemon, exec_type)
 | 
			
		||||
 | 
			
		||||
# Provide mdtpd ability to access QMUXD/IPCRouter for QMI
 | 
			
		||||
qmux_socket(mdtpdaemon);
 | 
			
		||||
allow mdtpdaemon self:socket create_socket_perms;
 | 
			
		||||
allowxperm mdtpdaemon self:socket ioctl msm_sock_ipc_ioctls;
 | 
			
		||||
 | 
			
		||||
# Provide tee ability to run executables in rootfs for MDTP
 | 
			
		||||
allow mdtpdaemon rootfs:file x_file_perms;
 | 
			
		||||
allow mdtpdaemon ion_device:chr_file r_file_perms;
 | 
			
		||||
allow mdtpdaemon sysfs_data:file r_file_perms;
 | 
			
		||||
							
								
								
									
										37
									
								
								legacy/vendor/common/mdtpservice_app.te
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										37
									
								
								legacy/vendor/common/mdtpservice_app.te
									
									
									
									
										vendored
									
									
								
							@@ -1,37 +0,0 @@
 | 
			
		||||
# Copyright (c) 2015, The Linux Foundation. All rights reserved.
 | 
			
		||||
#
 | 
			
		||||
# Redistribution and use in source and binary forms, with or without
 | 
			
		||||
# modification, are permitted provided that the following conditions are
 | 
			
		||||
# met:
 | 
			
		||||
#     * Redistributions of source code must retain the above copyright
 | 
			
		||||
#       notice, this list of conditions and the following disclaimer.
 | 
			
		||||
#     * Redistributions in binary form must reproduce the above
 | 
			
		||||
#       copyright notice, this list of conditions and the following
 | 
			
		||||
#       disclaimer in the documentation and/or other materials provided
 | 
			
		||||
#       with the distribution.
 | 
			
		||||
#     * Neither the name of The Linux Foundation nor the names of its
 | 
			
		||||
#       contributors may be used to endorse or promote products derived
 | 
			
		||||
#       from this software without specific prior written permission.
 | 
			
		||||
#
 | 
			
		||||
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
 | 
			
		||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 | 
			
		||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
 | 
			
		||||
# ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
 | 
			
		||||
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 | 
			
		||||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 | 
			
		||||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
 | 
			
		||||
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 | 
			
		||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
 | 
			
		||||
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 | 
			
		||||
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 | 
			
		||||
 | 
			
		||||
type mdtpservice_app, domain;
 | 
			
		||||
app_domain(mdtpservice_app)
 | 
			
		||||
binder_use(mdtpservice_app)
 | 
			
		||||
 | 
			
		||||
# allow mdtpservice_app to interact with proxy daemon
 | 
			
		||||
binder_call(mdtpservice_app, mdtpdaemon_service)
 | 
			
		||||
 | 
			
		||||
# file permissions
 | 
			
		||||
allow mdtpservice_app mdtp_svc_app_data_file:dir create_dir_perms;
 | 
			
		||||
allow mdtpservice_app mdtp_svc_app_data_file:file create_file_perms;
 | 
			
		||||
							
								
								
									
										4
									
								
								legacy/vendor/common/seapp_contexts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								legacy/vendor/common/seapp_contexts
									
									
									
									
										vendored
									
									
								
							@@ -31,10 +31,6 @@ user=system seinfo=platform name=com.qualcomm.location.XT isPrivApp=true domain=
 | 
			
		||||
#Add new domain for QSEE services
 | 
			
		||||
user=system seinfo=platform name=com.qualcomm.qti.auth.fidocryptoservice domain=qsee_svc_app type=system_app_data_file
 | 
			
		||||
 | 
			
		||||
#Add new domain for MDTP services
 | 
			
		||||
user=system seinfo=platform name=com.qualcomm.qti.securemsm.mdtp.MdtpService domain=mdtpservice_app type=mdtp_svc_app_data_file
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# AtFwd app
 | 
			
		||||
user=_app seinfo=platform name=com.qualcomm.telephony domain=qtelephony type=app_data_file levelFrom=all
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								legacy/vendor/common/service.te
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								legacy/vendor/common/service.te
									
									
									
									
										vendored
									
									
								
							@@ -38,5 +38,4 @@ type improve_touch_service,       service_manager_type;
 | 
			
		||||
type usf_service,                 service_manager_type;
 | 
			
		||||
type dtseagleservice_service,     service_manager_type;
 | 
			
		||||
type gba_auth_service,            service_manager_type;
 | 
			
		||||
type mdtpdaemon_service,          service_manager_type;
 | 
			
		||||
type qtitetherservice_service,    service_manager_type;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								legacy/vendor/common/service_contexts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								legacy/vendor/common/service_contexts
									
									
									
									
										vendored
									
									
								
							@@ -41,7 +41,6 @@ improveTouch.HandBiometricManagerService       u:object_r:improve_touch_service:
 | 
			
		||||
DigitalPen                                     u:object_r:usf_service:s0
 | 
			
		||||
dts_eagle_service                              u:object_r:dtseagleservice_service:s0
 | 
			
		||||
com.qualcomm.qti.secota.service.SecotaNService u:object_r:secotad_service:s0
 | 
			
		||||
mdtp                                           u:object_r:mdtpdaemon_service:s0
 | 
			
		||||
qtitetherservice                               u:object_r:qtitetherservice_service:s0
 | 
			
		||||
com.qualcomm.qti.seemp.health                  u:object_r:seemp_health_daemon_service:s0
 | 
			
		||||
com.qualcomm.qti.uceservice                    u:object_r:imsrcs_service:s0
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								legacy/vendor/common/system_app.te
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								legacy/vendor/common/system_app.te
									
									
									
									
										vendored
									
									
								
							@@ -130,9 +130,6 @@ allow system_app gba_auth_service:service_manager find;
 | 
			
		||||
allow system_app wbc_service:service_manager add;
 | 
			
		||||
allow system_app self:netlink_kobject_uevent_socket { read bind setopt create };
 | 
			
		||||
 | 
			
		||||
# allow system_app to interact with mdtp daemon
 | 
			
		||||
binder_call(system_app, mdtpdaemon)
 | 
			
		||||
 | 
			
		||||
# allow access to system app for radio files
 | 
			
		||||
allow system_app radio_data_file:dir rw_dir_perms;
 | 
			
		||||
allow system_app radio_data_file:file create_file_perms;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user