sepolicy: Update legacy se linux rules for ims application

org.codeaurora.ims is not running as phone uid now.
Update se linux rules accordingly for legacy targets.

Change-Id: I911f1c0bd890727752916b127f7151bf58fa2414
CRs-Fixed: 2675934
This commit is contained in:
Muhammed Siju 2020-05-01 20:06:02 +05:30 committed by Ravi Kumar Siddojigari
parent cffb1ae449
commit 096ec78cbf
4 changed files with 48 additions and 4 deletions

View file

@ -60,4 +60,4 @@ allow hal_imsrtp sysfs_data:file r_file_perms;
get_prop(hal_imsrtp, qcom_ims_prop)
binder_call(hal_imsrtp, radio)
binder_call(hal_imsrtp, vendor_qtelephony)

41
legacy/vendor/common/qtelephony.te vendored Normal file
View file

@ -0,0 +1,41 @@
# Copyright (c) 2020, 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.
get_prop(vendor_qtelephony, vendor_radio_prop)
get_prop(vendor_qtelephony, qcom_ims_prop)
get_prop(vendor_qtelephony, vendor_persist_camera_prop)
get_prop(vendor_qtelephony, vendor_audio_prop)
get_prop(vendor_qtelephony, vendor_video_prop)
allow vendor_qtelephony { cameraserver_service mediaextractor_service mediaserver_service mediametrics_service radio_service drmserver_service audioserver_service}:service_manager find;
allow vendor_qtelephony hal_imsrtp_hwservice:hwservice_manager find;
hal_client_domain(vendor_qtelephony, hal_telephony)
binder_call(vendor_qtelephony, hal_imsrtp)
userdebug_or_eng(`
diag_use(vendor_qtelephony)
')

View file

@ -36,7 +36,6 @@ userdebug_or_eng(`
get_prop(radio, vendor_radio_prop)
binder_call(radio, hal_imsrtp)
allow radio hal_imsrtp_hwservice:hwservice_manager find;
# permissions for IMS-ConnectionmanagerTestApp
userdebug_or_eng(`
@ -47,5 +46,3 @@ userdebug_or_eng(`
allow radio vendor_mbn_data_file:file r_file_perms;
')
hal_client_domain(radio, hal_perf)
get_prop(radio, qcom_ims_prop)

View file

@ -55,3 +55,9 @@ user=system seinfo=platform name=com.qualcomm.qti.poweroffalarm domain=poweroffa
#add new domain for qtidataservices
user=_app seinfo=platform name=.qtidataservices domain=qtidataservices_app type=app_data_file levelFrom=all
#Add new domain for ims app
user=_app seinfo=platform name=org.codeaurora.ims isPrivApp=true domain=vendor_qtelephony type=app_data_file levelFrom=all
#Add DeviceInfoHidlClient to vendor_qtelephony
user=_app seinfo=platform name=com.qualcomm.qti.devicestatisticsservice domain=vendor_qtelephony type=app_data_file levelFrom=all