Skip to content

Commit

Permalink
sepolicy: Define key for TimeService apk
Browse files Browse the repository at this point in the history
Define key for TimeService apk.

Change-Id: I612120345bed56fd92d438a0a2db3db6aa919519
  • Loading branch information
Mohit Aggarwal authored and Gerrit - the friendly Code Review server committed Sep 4, 2019
1 parent eee010c commit e0df12a
Show file tree
Hide file tree
Showing 8 changed files with 125 additions and 6 deletions.
2 changes: 2 additions & 0 deletions Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ ifeq (,$(filter sdm845 sdm710, $(TARGET_BOARD_PLATFORM)))
$(LOCAL_PATH)/generic/vendor/common \
$(LOCAL_PATH)/qva/vendor/common/sysmonapp \
$(LOCAL_PATH)/qva/vendor/ssg \
$(LOCAL_PATH)/timeservice \
$(LOCAL_PATH)/qva/vendor/common

ifeq ($(TARGET_SEPOLICY_DIR),)
Expand All @@ -46,6 +47,7 @@ ifneq (,$(filter sdm845 sdm710, $(TARGET_BOARD_PLATFORM)))
$(LOCAL_PATH) \
$(LOCAL_PATH)/legacy/vendor/common/sysmonapp \
$(LOCAL_PATH)/legacy/vendor/ssg \
$(LOCAL_PATH)/timeservice \
$(LOCAL_PATH)/legacy/vendor/common

ifeq ($(TARGET_SEPOLICY_DIR),)
Expand Down
3 changes: 0 additions & 3 deletions generic/vendor/common/seapp_contexts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@
# A fallback in case tango_core is missing something critical that untrusted_app provides
user=_app seinfo=tango name=com.google.tango:app domain=untrusted_app type=app_data_file levelFrom=user

#Needed for time service apk
user=_app seinfo=platform name=com.qualcomm.timeservice domain=timeservice_app type=app_data_file levelFrom=all

# AtFwd app
user=_app seinfo=platform name=com.qualcomm.telephony domain=qtelephony type=app_data_file levelFrom=all

Expand Down
3 changes: 0 additions & 3 deletions legacy/vendor/common/seapp_contexts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ user=_app seinfo=platform name=com.qualcomm.telephony domain=qtelephony type=app
#Add new domain for QDMA
user=system seinfo=platform name=com.qualcomm.qti.qdma domain=qdma_app type=system_app_data_file

# Add time service app
user=_app seinfo=platform name=com.qualcomm.timeservice domain=timeservice_app type=app_data_file levelFrom=all

#Add new domain for logkit services
user=system seinfo=platform name=com.qualcomm.qti.logkit domain=qti_logkit_app type=system_app_data_file

Expand Down
29 changes: 29 additions & 0 deletions timeservice/keys.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright (c) 2019, 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.

[@TIMESERVICE]
ALL : device/qcom/sepolicy/timeservice/timeservice_app_cert.x509.pem
40 changes: 40 additions & 0 deletions timeservice/mac_permissions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2019, 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.
-->
<policy>

<!--
See /system/sepolicy/private/mac_permissions.xml
-->

<signer signature="@TIMESERVICE" >
<seinfo value="timeserviceapp" />
</signer>

</policy>
30 changes: 30 additions & 0 deletions timeservice/seapp_contexts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright (c) 2019, 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.

# Needed for time service apk
user=_app seinfo=timeserviceapp name=com.qualcomm.timeservice domain=timeservice_app type=app_data_file levelFrom=all

Binary file added timeservice/timeservice_app_cert.pk8
Binary file not shown.
24 changes: 24 additions & 0 deletions timeservice/timeservice_app_cert.x509.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
-----BEGIN CERTIFICATE-----
MIID+zCCAuOgAwIBAgIJAMg/RXpMUk2MMA0GCSqGSIb3DQEBCwUAMIGTMQswCQYD
VQQGEwJJTjEQMA4GA1UECAwHVW5rbm93bjEQMA4GA1UEBwwHVW5rbm93bjEkMCIG
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