diff options
author | jinfaw <jinfaw@codeaurora.org> | 2017-07-27 14:40:33 +0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-11-08 04:16:06 -0800 |
commit | 25607fab5996e81bdce5c81f8d2fd16685e27e4d (patch) | |
tree | 92868cc1a34f9a687f3c0517e606bdea0008098c /msm8952 | |
parent | fffae390a07cf83beb3c6ad6994aedca9079a3f2 (diff) | |
download | android_device_qcom_sepolicy-25607fab5996e81bdce5c81f8d2fd16685e27e4d.tar.gz android_device_qcom_sepolicy-25607fab5996e81bdce5c81f8d2fd16685e27e4d.tar.bz2 android_device_qcom_sepolicy-25607fab5996e81bdce5c81f8d2fd16685e27e4d.zip |
sepolicy:add sepolicy rule for regionalization
1.Propagation regionalization sepolicy rule to sdm845
2.refactor service definition rule
3.Add sepolicy rule 8909,8937,8952,8953,8976
Change-Id: I93bb347d02962a908a284eed62c1fe308292b802
CRs-Fixed: 2085344
Diffstat (limited to 'msm8952')
-rw-r--r-- | msm8952/idmap.te | 33 | ||||
-rw-r--r-- | msm8952/platform_app.te | 32 | ||||
-rw-r--r-- | msm8952/priv_app.te | 32 | ||||
-rw-r--r-- | msm8952/service.te | 2 | ||||
-rw-r--r-- | msm8952/service_contexts | 2 | ||||
-rw-r--r-- | msm8952/system_app.te | 34 | ||||
-rw-r--r-- | msm8952/system_server.te | 1 | ||||
-rw-r--r-- | msm8952/untrusted_app.te | 33 | ||||
-rw-r--r-- | msm8952/zygote.te | 4 |
9 files changed, 167 insertions, 6 deletions
diff --git a/msm8952/idmap.te b/msm8952/idmap.te new file mode 100644 index 00000000..15a91bfb --- /dev/null +++ b/msm8952/idmap.te @@ -0,0 +1,33 @@ +# Copyright (c) 2017, 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. + +#for oemfs +allow idmap oemfs:file r_file_perms; +allow idmap oemfs:dir r_dir_perms; +#for regionalization +allow idmap regionalization_file:file r_file_perms; +allow idmap regionalization_file:dir r_dir_perms; diff --git a/msm8952/platform_app.te b/msm8952/platform_app.te new file mode 100644 index 00000000..1930fa47 --- /dev/null +++ b/msm8952/platform_app.te @@ -0,0 +1,32 @@ +# Copyright (c) 2017, 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. + +#for oemfs +allow platform_app oemfs:lnk_file { read getattr }; +#for regionalization +allow platform_app regionalization_file:file r_file_perms; +allow platform_app regionalization_file:dir r_dir_perms; diff --git a/msm8952/priv_app.te b/msm8952/priv_app.te new file mode 100644 index 00000000..471a1d47 --- /dev/null +++ b/msm8952/priv_app.te @@ -0,0 +1,32 @@ +# Copyright (c) 2017, 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. + +#for oemfs +allow priv_app oemfs:lnk_file { read getattr }; +#for regionalization +allow priv_app regionalization_file:file r_file_perms; +allow priv_app regionalization_file:dir r_dir_perms; diff --git a/msm8952/service.te b/msm8952/service.te index 9b57c08e..70170418 100644 --- a/msm8952/service.te +++ b/msm8952/service.te @@ -25,5 +25,3 @@ # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# regionalization service -type regionalization_service, system_api_service, service_manager_type; diff --git a/msm8952/service_contexts b/msm8952/service_contexts index ef90b74b..70170418 100644 --- a/msm8952/service_contexts +++ b/msm8952/service_contexts @@ -25,5 +25,3 @@ # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# Regionalization service -regionalization u:object_r:regionalization_service:s0 diff --git a/msm8952/system_app.te b/msm8952/system_app.te new file mode 100644 index 00000000..59b7b1b2 --- /dev/null +++ b/msm8952/system_app.te @@ -0,0 +1,34 @@ +# Copyright (c) 2017, 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. + +#for oemfs +allow system_app oemfs:lnk_file { read getattr }; +#for regionalization +allow system_app regionalization_file:file r_file_perms; +allow system_app regionalization_file:dir r_dir_perms; +allow system_app vendor_radio_data_file:dir rw_dir_perms; +allow system_app vendor_radio_data_file:file create_file_perms; diff --git a/msm8952/system_server.te b/msm8952/system_server.te index 54c7faa6..b5be63b9 100644 --- a/msm8952/system_server.te +++ b/msm8952/system_server.te @@ -26,7 +26,6 @@ # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # For Regionalization service -allow system_server regionalization_service:service_manager { add find }; allow system_server regionalization_file:file rw_file_perms; allow system_server regionalization_file:dir r_dir_perms; allow system_server resourcecache_data_file:dir create_dir_perms; diff --git a/msm8952/untrusted_app.te b/msm8952/untrusted_app.te new file mode 100644 index 00000000..eb416820 --- /dev/null +++ b/msm8952/untrusted_app.te @@ -0,0 +1,33 @@ +# Copyright (c) 2017, 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. + + +# for oemfs +allow untrusted_app oemfs:lnk_file { read getattr }; +#for regionalization +allow untrusted_app regionalization_file:file r_file_perms; +allow untrusted_app regionalization_file:dir r_dir_perms; diff --git a/msm8952/zygote.te b/msm8952/zygote.te index 105a3279..e7ef41f4 100644 --- a/msm8952/zygote.te +++ b/msm8952/zygote.te @@ -1,4 +1,4 @@ -# Copyright (c) 2016, The Linux Foundation. All rights reserved. +# Copyright (c) 2016-2017, 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 @@ -29,3 +29,5 @@ allow zygote persist_file:dir r_dir_perms; allow zygote regionalization_file:dir r_dir_perms; allow zygote regionalization_file:file r_file_perms; +allow zygote oemfs:dir r_dir_perms; +allow zygote oemfs:file r_file_perms;
\ No newline at end of file |