Fix apex_sepolicy_tests_test am: 3e592f2eb6
am: 3d4795888e
am: 98b1084ec7
am: 39295cade9
am: 900e07b756
Original change: https://android-review.googlesource.com/c/platform/system/sepolicy/+/2614829 Change-Id: I4fd76b5846e18deff11172d9f66d858eca1ad481 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
39af59bb3b
1 changed files with 4 additions and 2 deletions
|
@ -81,6 +81,7 @@ def match_path(path: str, matcher: Matcher) -> bool:
|
|||
|
||||
def check_rule(pol, path: str, tcontext: str, rule: Rule) -> List[str]:
|
||||
"""Returns error message if scontext can't read the target"""
|
||||
errors = []
|
||||
match rule:
|
||||
case AllowRead(tclass, scontext):
|
||||
# Test every source in scontext(set)
|
||||
|
@ -90,9 +91,10 @@ def check_rule(pol, path: str, tcontext: str, rule: Rule) -> List[str]:
|
|||
tclass={tclass},
|
||||
perms={'read'}))
|
||||
if len(te_rules) > 0:
|
||||
return [] # no errors
|
||||
continue # no errors
|
||||
|
||||
return [f"Error: {path}: {s} can't read. (tcontext={tcontext})"]
|
||||
errors.append(f"Error: {path}: {s} can't read. (tcontext={tcontext})")
|
||||
return errors
|
||||
|
||||
|
||||
rules = [
|
||||
|
|
Loading…
Reference in a new issue