Merge "Fix policy file order for hal_attributes" am: b2984a49bd
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2121272 Change-Id: I5613be959f16d63d21cab13eda4343f2055e7b70 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
cf9c59241d
1 changed files with 5 additions and 3 deletions
|
@ -45,10 +45,9 @@ var policyConfOrder = []string{
|
|||
"mls",
|
||||
"policy_capabilities",
|
||||
"te_macros",
|
||||
"attributes",
|
||||
"ioctl_defines",
|
||||
"ioctl_macros",
|
||||
"*.te",
|
||||
"attributes|*.te",
|
||||
"roles_decl",
|
||||
"roles",
|
||||
"users",
|
||||
|
@ -198,7 +197,10 @@ func (c *policyConf) mlsCats() int {
|
|||
|
||||
func findPolicyConfOrder(name string) int {
|
||||
for idx, pattern := range policyConfOrder {
|
||||
if pattern == name || (pattern == "*.te" && strings.HasSuffix(name, ".te")) {
|
||||
// We could use regexp but it seems like an overkill
|
||||
if pattern == "attributes|*.te" && (name == "attributes" || strings.HasSuffix(name, ".te")) {
|
||||
return idx
|
||||
} else if pattern == name {
|
||||
return idx
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue