Depends on D15089
Remove code incorporated in the selinux.xml file (which is accessed by IncludeRules). In addition, this improves the highlight of regular expressions.
SELinux CIL Policies:
- Moves to "selinux.xml" access vectors permissions and filesystem (keywords), the highlighting of IPs and RegExp, etc. In addition, this adds Android permissions and improve IPv6 detection.
- Improves the highlighting of file contexts (now "type" is highlighted with a different color).
- Fix permissions list in "ioctl" kind (permissionx) and "call" statements. Although this is not completely resolved, for example, it is difficult to know if the keyword "call", at the beginning of a block, is a statement or a permission.
- Add "sctp" protocol keyword and policy capabilities keywords (defined in "selinux.xml").
SELinux File Context:
- Move to "selinux.xml" functions, RegExp, comments, quotes of macros, etc.
- Simplify code.
- Improves the detection of file contexts. Now the detection of valid contexts and valid levels/ranges is more accurate.
- Add keywords from the Reference Policy, built-in in M 4 macros and some relevant statements (defined in "selinux.xml").
- Add some file names (in "extensions") of policy configuration files (Ex: "service_contexts" & "property_contexts" are configuration files for Android policies).
NOTE: I included the changes in this old diff that I duplicated by mistake in D14526 (originally it contained the changes to SELinux that are here).