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
4d71b96e
Commit
4d71b96e
authored
7 years ago
by
TreeHugger Robot
Committed by
Android (Google) Code Review
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Retain neverallow rules in CIL files" into oc-dev
parents
2a7f4fb0
b8787693
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Android.mk
+19
-43
19 additions, 43 deletions
Android.mk
with
19 additions
and
43 deletions
Android.mk
+
19
−
43
View file @
4d71b96e
...
...
@@ -305,24 +305,15 @@ $(PLAT_PUBLIC_POLICY) $(PLAT_PRIVATE_POLICY))
-s
$^
>
$@
$(
hide
)
sed
'/dontaudit/d'
$@
>
$@
.dontaudit
plat_policy_nvr
:=
$(
intermediates
)
/plat_policy_nvr.cil
$(plat_policy_nvr)
:
PRIVATE_ADDITIONAL_CIL_FILES :=
\
$(LOCAL_BUILT_MODULE)
:
PRIVATE_ADDITIONAL_CIL_FILES :=
\
$(call build_policy
,
$(sepolicy_build_cil_workaround_files)
,
$(PLAT_PRIVATE_POLICY))
$(plat_policy_nvr)
:
$(plat_policy.conf) $(HOST_OUT_EXECUTABLES)/checkpolicy
\
$(LOCAL_BUILT_MODULE)
:
$(plat_policy.conf) $(HOST_OUT_EXECUTABLES)/checkpolicy
\
$(HOST_OUT_EXECUTABLES)/secilc
\
$(call build_policy
,
$(sepolicy_build_cil_workaround_files)
,
$(PLAT_PRIVATE_POLICY))
@
mkdir
-p
$(
dir
$@
)
$(
hide
)
$(
HOST_OUT_EXECUTABLES
)
/checkpolicy
-M
-C
-c
$(
POLICYVERS
)
-o
$@
$<
$(
hide
)
cat
$(
PRIVATE_ADDITIONAL_CIL_FILES
)
>>
$@
$(LOCAL_BUILT_MODULE)
:
PRIVATE_CIL_FILES := $(plat_policy_nvr)
$(LOCAL_BUILT_MODULE)
:
$(HOST_OUT_EXECUTABLES)/secilc $(plat_policy_nvr)
@
mkdir
-p
$(
dir
$@
)
# Strip out neverallow statements. They aren't needed on-device and their presence
# significantly slows down on-device compilation
(
e.g., from 400 ms to 6,400 ms on
# sailfish-eng
)
.
grep
-v
'^(neverallow'
$(
PRIVATE_CIL_FILES
)
>
$@
# Confirm that the resulting policy compiles
$(
hide
)
$(
HOST_OUT_EXECUTABLES
)
/secilc
-M
true
-G
-c
$(
POLICYVERS
)
$@
-o
/dev/null
-f
/dev/null
$(
hide
)
$(
HOST_OUT_EXECUTABLES
)
/secilc
-M
true
-G
-N
-c
$(
POLICYVERS
)
$@
-o
/dev/null
-f
/dev/null
built_plat_cil
:=
$(
LOCAL_BUILT_MODULE
)
plat_policy.conf
:=
...
...
@@ -363,16 +354,13 @@ $(current_mapping.cil) : $(plat_pub_policy.cil) $(HOST_OUT_EXECUTABLES)/version_
ifeq
($(BOARD_SEPOLICY_VERS), $(PLATFORM_SEPOLICY_VERSION))
mapping_policy
_nvr
:=
$(
current_mapping.cil
)
mapping_policy
:=
$(
current_mapping.cil
)
else
mapping_policy
_nvr
:=
$(
addsuffix /
$(
BOARD_SEPOLICY_VERS
)
.cil,
$(
PLAT_PRIVATE_POLICY
)
/mapping
)
mapping_policy
:=
$(
addsuffix /
$(
BOARD_SEPOLICY_VERS
)
.cil,
$(
PLAT_PRIVATE_POLICY
)
/mapping
)
endif
$(LOCAL_BUILT_MODULE)
:
$(mapping_policy_nvr)
# Strip out neverallow statements. They aren't needed on-device and their presence
# significantly slows down on-device compilation
(
e.g., from 400 ms to 6,400 ms on
# sailfish-eng
)
.
grep
-v
'^(neverallow'
$<
>
$@
$(LOCAL_BUILT_MODULE)
:
$(mapping_policy) $(ACP)
$(
hide
)
$(
ACP
)
$<
$@
built_mapping_cil
:=
$(
LOCAL_BUILT_MODULE
)
current_mapping.cil
:=
...
...
@@ -434,25 +422,15 @@ $(reqd_policy_mask.cil)
$(
hide
)
$<
-C
-M
-c
$(
POLICYVERS
)
-o
$@
.tmp
$(
PRIVATE_POL_CONF
)
$(
hide
)
grep
-Fxv
-f
$(
PRIVATE_REQD_MASK
)
$@
.tmp
>
$@
nonplat_policy_nvr
:=
$(
intermediates
)
/nonplat_policy_nvr.cil
$(nonplat_policy_nvr)
:
PRIVATE_VERS := $(BOARD_SEPOLICY_VERS)
$(nonplat_policy_nvr)
:
PRIVATE_TGT_POL := $(nonplat_policy_raw)
$(nonplat_policy_nvr)
:
$(plat_pub_policy.cil) $(nonplat_policy_raw)
\
$(HOST_OUT_EXECUTABLES)/version_policy
$(LOCAL_BUILT_MODULE)
:
PRIVATE_VERS := $(BOARD_SEPOLICY_VERS)
$(LOCAL_BUILT_MODULE)
:
PRIVATE_TGT_POL := $(nonplat_policy_raw)
$(LOCAL_BUILT_MODULE)
:
PRIVATE_DEP_CIL_FILES := $(built_plat_cil) $(built_mapping_cil)
$(LOCAL_BUILT_MODULE)
:
$(plat_pub_policy.cil) $(nonplat_policy_raw)
\
$(HOST_OUT_EXECUTABLES)/version_policy $(HOST_OUT_EXECUTABLES)/secilc
\
$(build_plat_cil) $(built_mapping_cil)
@
mkdir
-p
$(
dir
$@
)
$(
HOST_OUT_EXECUTABLES
)
/version_policy
-b
$<
-t
$(
PRIVATE_TGT_POL
)
-n
$(
PRIVATE_VERS
)
-o
$@
$(LOCAL_BUILT_MODULE)
:
PRIVATE_NONPLAT_CIL_FILES := $(nonplat_policy_nvr)
$(LOCAL_BUILT_MODULE)
:
PRIVATE_DEP_CIL_FILES := $(built_plat_cil) $(built_mapping_cil)
$(LOCAL_BUILT_MODULE)
:
$(HOST_OUT_EXECUTABLES)/secilc $(nonplat_policy_nvr) $(built_plat_cil)
\
$(built_mapping_cil)
@
mkdir
-p
$(
dir
$@
)
# Strip out neverallow statements. They aren't needed on-device and their presence
# significantly slows down on-device compilation
(
e.g., from 400 ms to 6,400 ms on
# sailfish-eng
)
.
grep
-v
'^(neverallow'
$(
PRIVATE_NONPLAT_CIL_FILES
)
>
$@
# Confirm that the resulting policy compiles combined with platform and mapping policies
$(
hide
)
$(
HOST_OUT_EXECUTABLES
)
/secilc
-M
true
-G
-c
$(
POLICYVERS
)
\
$(
hide
)
$(
HOST_OUT_EXECUTABLES
)
/secilc
-M
true
-G
-N
-c
$(
POLICYVERS
)
\
$(
PRIVATE_DEP_CIL_FILES
)
$@
-o
/dev/null
-f
/dev/null
built_nonplat_cil
:=
$(
LOCAL_BUILT_MODULE
)
...
...
@@ -508,9 +486,9 @@ LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
include
$(BUILD_SYSTEM)/base_rules.mk
all_cil_files
:=
\
$(
plat_policy_nvr
)
\
$(
mapping_
policy_nvr
)
\
$(
nonplat_
policy_nvr
)
\
$(
built_plat_cil
)
\
$(
built_
mapping_
cil
)
\
$(
built_
nonplat_
cil
)
$(LOCAL_BUILT_MODULE)
:
PRIVATE_CIL_FILES := $(all_cil_files)
$(LOCAL_BUILT_MODULE)
:
$(HOST_OUT_EXECUTABLES)/secilc $(HOST_OUT_EXECUTABLES)/sepolicy-analyze $(all_cil_files)
...
...
@@ -1152,10 +1130,8 @@ built_precompiled_sepolicy :=
built_sepolicy
:=
built_plat_svc
:=
built_nonplat_svc
:=
mapping_policy
_nvr
:=
mapping_policy
:=
my_target_arch
:=
nonplat_policy_nvr
:=
plat_policy_nvr
:=
plat_pub_policy.cil
:=
reqd_policy_mask.cil
:=
sepolicy_build_files
:=
...
...
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