Lexicographically sort perms in rules output of searchpolicy.py
Bug: 238394904 Test: atest seamendc-test && atest CtsSecurityHostTestCases Change-Id: I841e7d5cf3616d692dcd5b749544268bcbab76c2
This commit is contained in:
parent
d5098f99a9
commit
6e7e003344
1 changed files with 2 additions and 2 deletions
|
@ -78,10 +78,10 @@ rules = []
|
|||
for r in TERules:
|
||||
if len(r.perms) > 1:
|
||||
rules.append("allow " + r.sctx + " " + r.tctx + ":" + r.tclass + " { " +
|
||||
" ".join(r.perms) + " };")
|
||||
" ".join(sorted(r.perms)) + " };")
|
||||
else:
|
||||
rules.append("allow " + r.sctx + " " + r.tctx + ":" + r.tclass + " " +
|
||||
" ".join(r.perms) + ";")
|
||||
" ".join(sorted(r.perms)) + ";")
|
||||
|
||||
for r in sorted(rules):
|
||||
print(r)
|
||||
|
|
Loading…
Reference in a new issue