-
CIL has Why do Why do classes and SIDs need to be put in a specific order? What happens if I swap the order of two classes/SIDs? If this ordering is required, how does the kernel language and Reference Policy m4 language express it? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The ordering of some rules matters for the kernel policy. Historically the order that classes, sids, and categories appeared in the policy (policy.conf or Refpolicy) determined their ordering in the kernel binary policy. For categories, this ordering is used to resolve a category range. It used to be required for a policy to list classes and sids in the exact order the kernel did. When CIL was created the ordering for classes was still required, but we did not want ordering based on the order the rules appeared (because we wanted to be able to break up policy into multiple files without caring about the order that the CIL compiler saw them), so we created ordering rules to allow the order to be specified. In CIL there can be multiple ordering rules and CIL will try to piece them together into one ordering. If it can't or if the ordering rules allow an ambiguity, then an error will be given. The order rule would not strictly be needed any more for classes, but we left it in for compatibility. For sensitivities, the order rule replaces the dominance rule. For categories, the order rule is still needed to later calculate category ranges. |
Beta Was this translation helpful? Give feedback.
The ordering of some rules matters for the kernel policy. Historically the order that classes, sids, and categories appeared in the policy (policy.conf or Refpolicy) determined their ordering in the kernel binary policy. For categories, this ordering is used to resolve a category range. It used to be required for a policy to list classes and sids in the exact order the kernel did.
When CIL was created the ordering for classes was still required, but we did not want ordering based on the order the rules appeared (because we wanted to be able to break up policy into multiple files without caring about the order that the CIL compiler saw them), so we created ordering rules to allow the order…