Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sepolicy
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test
platform
system
sepolicy
Commits
d090db9d
Commit
d090db9d
authored
7 years ago
by
Daniel Cashman
Committed by
Android (Google) Code Review
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Change mapping file name to reflect its platform version." into oc-dev
parents
29ec5d42
4f9a648e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Android.mk
+54
-34
54 additions, 34 deletions
Android.mk
CleanSpec.mk
+1
-0
1 addition, 0 deletions
CleanSpec.mk
private/file_contexts
+4
-4
4 additions, 4 deletions
private/file_contexts
with
59 additions
and
38 deletions
Android.mk
+
54
−
34
View file @
d090db9d
...
...
@@ -24,38 +24,6 @@ PLATFORM_SEPOLICY_VERSION := $(join $(addsuffix .,$(sepolicy_major_vers)), $(sep
sepolicy_major_vers
:=
sepolicy_minor_vers
:=
include
$(CLEAR_VARS)
LOCAL_MODULE
:=
selinux_policy
LOCAL_MODULE_TAGS
:=
optional
# Include SELinux policy. We do this here because different modules
# need to be included based on the value of PRODUCT_FULL_TREBLE. This
# type of conditional inclusion cannot be done in top-level files such
# as build/target/product/embedded.mk.
# This conditional inclusion closely mimics the conditional logic
# inside init/init.cpp for loading SELinux policy from files.
ifeq
($(PRODUCT_FULL_TREBLE),true)
# Use split SELinux policy
LOCAL_REQUIRED_MODULES
+=
\
mapping_sepolicy.cil
\
nonplat_sepolicy.cil
\
plat_sepolicy.cil
\
plat_and_mapping_sepolicy.cil.sha256
\
secilc
\
nonplat_file_contexts
\
plat_file_contexts
# Include precompiled policy, unless told otherwise
ifneq
($(PRODUCT_PRECOMPILED_SEPOLICY),false)
LOCAL_REQUIRED_MODULES
+=
precompiled_sepolicy precompiled_sepolicy.plat_and_mapping.sha256
endif
else
# Use monolithic SELinux policy
LOCAL_REQUIRED_MODULES
+=
sepolicy
\
file_contexts.bin
endif
include
$(BUILD_PHONY_PACKAGE)
include
$(CLEAR_VARS)
# SELinux policy version.
# Must be <= /sys/fs/selinux/policyvers reported by the Android kernel.
...
...
@@ -197,6 +165,42 @@ ifneq (,$(filter address,$(SANITIZE_TARGET)))
with_asan
:=
true
endif
include
$(CLEAR_VARS)
LOCAL_MODULE
:=
selinux_policy
LOCAL_MODULE_TAGS
:=
optional
# Include SELinux policy. We do this here because different modules
# need to be included based on the value of PRODUCT_FULL_TREBLE. This
# type of conditional inclusion cannot be done in top-level files such
# as build/target/product/embedded.mk.
# This conditional inclusion closely mimics the conditional logic
# inside init/init.cpp for loading SELinux policy from files.
ifeq
($(PRODUCT_FULL_TREBLE),true)
platform_mapping_file
:=
$(
BOARD_SEPOLICY_VERS
)
.cil
# Use split SELinux policy
LOCAL_REQUIRED_MODULES
+=
\
$(
platform_mapping_file
)
\
nonplat_sepolicy.cil
\
plat_sepolicy.cil
\
plat_and_mapping_sepolicy.cil.sha256
\
secilc
\
nonplat_file_contexts
\
plat_file_contexts
\
plat_sepolicy_vers.txt
# Include precompiled policy, unless told otherwise
ifneq
($(PRODUCT_PRECOMPILED_SEPOLICY),false)
LOCAL_REQUIRED_MODULES
+=
precompiled_sepolicy precompiled_sepolicy.plat_and_mapping.sha256
endif
else
# Use monolithic SELinux policy
LOCAL_REQUIRED_MODULES
+=
sepolicy
\
file_contexts.bin
endif
include
$(BUILD_PHONY_PACKAGE)
##################################
# reqd_policy_mask - a policy.conf file which contains only the bare minimum
# policy necessary to use checkpolicy. This bare-minimum policy needs to be
...
...
@@ -335,10 +339,26 @@ plat_policy.conf :=
#################################
include
$(CLEAR_VARS)
LOCAL_MODULE
:=
mapping
_sepolicy
.cil
LOCAL_MODULE
:=
plat
_sepolicy
_vers.txt
LOCAL_MODULE_CLASS
:=
ETC
LOCAL_MODULE_TAGS
:=
optional
LOCAL_MODULE_PATH
:=
$(
TARGET_OUT
)
/etc/selinux
LOCAL_PROPRIETARY_MODULE
:=
true
LOCAL_MODULE_PATH
:=
$(
TARGET_OUT_VENDOR
)
/etc/selinux
include
$(BUILD_SYSTEM)/base_rules.mk
$(LOCAL_BUILT_MODULE)
:
PRIVATE_PLAT_SEPOL_VERS := $(BOARD_SEPOLICY_VERS)
$(LOCAL_BUILT_MODULE)
:
mkdir
-p
$(
dir
$@
)
echo
$(
PRIVATE_PLAT_SEPOL_VERS
)
>
$@
#################################
include
$(CLEAR_VARS)
LOCAL_MODULE
:=
$(
platform_mapping_file
)
LOCAL_MODULE_CLASS
:=
ETC
LOCAL_MODULE_TAGS
:=
optional
LOCAL_MODULE_PATH
:=
$(
TARGET_OUT
)
/etc/selinux/mapping
include
$(BUILD_SYSTEM)/base_rules.mk
...
...
This diff is collapsed.
Click to expand it.
CleanSpec.mk
+
1
−
0
View file @
d090db9d
...
...
@@ -70,3 +70,4 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/selinux/nonplat_property
$(
call
add-clean-step,
rm
-rf
$(
PRODUCT_OUT
)
/vendor/etc/selinux/mapping_sepolicy.cil
)
$(
call
add-clean-step,
rm
-rf
$(
PRODUCT_OUT
)
/system/etc/selinux/plat_sepolicy.cil.sha256
)
$(
call
add-clean-step,
rm
-rf
$(
PRODUCT_OUT
)
/vendor/etc/selinux/precompiled_sepolicy.plat.sha256
)
$(
call
add-clean-step,
rm
-rf
$(
PRODUCT_OUT
)
/system/etc/selinux/mapping_sepolicy.cil
)
This diff is collapsed.
Click to expand it.
private/file_contexts
+
4
−
4
View file @
d090db9d
...
...
@@ -248,14 +248,14 @@
/system/bin/virtual_touchpad u:object_r:virtual_touchpad_exec:s0
/system/bin/vr_wm u:object_r:vr_wm_exec:s0
/system/bin/hw/android\.hidl\.allocator@1\.0-service u:object_r:hal_allocator_default_exec:s0
/system/etc/selinux/mapping
_sepolicy
.cil u:object_r:sepolicy_file:s0
/system/etc/selinux/plat_mac_permissions.xml u:object_r:mac_perms_file:s0
/system/etc/selinux/mapping
/[0-9]+\.[0-9]+\
.cil u:object_r:sepolicy_file:s0
/system/etc/selinux/plat_mac_permissions
\
.xml u:object_r:mac_perms_file:s0
/system/etc/selinux/plat_property_contexts u:object_r:property_contexts_file:s0
/system/etc/selinux/plat_service_contexts u:object_r:service_contexts_file:s0
/system/etc/selinux/plat_file_contexts u:object_r:file_contexts_file:s0
/system/etc/selinux/plat_seapp_contexts u:object_r:seapp_contexts_file:s0
/system/etc/selinux/plat_sepolicy.cil u:object_r:sepolicy_file:s0
/system/etc/selinux/plat_and_mapping_sepolicy.cil.sha256 u:object_r:sepolicy_file:s0
/system/etc/selinux/plat_and_mapping_sepolicy
\
.cil
\
.sha256 u:object_r:sepolicy_file:s0
/system/bin/vr_hwc u:object_r:vr_hwc_exec:s0
#############################
...
...
@@ -284,7 +284,7 @@
/vendor/etc/selinux/nonplat_seapp_contexts u:object_r:seapp_contexts_file:s0
/vendor/etc/selinux/nonplat_sepolicy.cil u:object_r:sepolicy_file:s0
/vendor/etc/selinux/precompiled_sepolicy u:object_r:sepolicy_file:s0
/vendor/etc/selinux/precompiled_sepolicy.plat_and_mapping.sha256 u:object_r:sepolicy_file:s0
/vendor/etc/selinux/precompiled_sepolicy
\
.plat_and_mapping
\
.sha256 u:object_r:sepolicy_file:s0
/vendor/etc/selinux/vndservice_contexts u:object_r:vndservice_contexts_file:s0
#############################
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment