Skip to contentSkip to conversation

assertions

DISCUSSION Russell Coker 2 participants 2 messages Jun 28, 2004 SELinux security module

lore
Share & tools
lore
#0 lore raw

Would it be possible for the assertion messages to include the line number of the offending line?

Currently the assertion messages give the number of the line containing the assertion, but not the number of the line which violates it, which can be annoying when lots of attributes are used. Sure we can use apol to get the same information, but if checkpolicy already has the information then it would be easier to have it just deliver it.

Signature · 9 lines
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#1 lore raw
Quoted 8 lines · Russell Coker

Would it be possible for the assertion messages to include the line number of the offending line?

Currently the assertion messages give the number of the line containing the assertion, but not the number of the line which violates it, which can be annoying when lots of attributes are used. Sure we can use apol to get the same information, but if checkpolicy already has the information then it would be easier to have it just deliver it.

checkpolicy collects all of the assertions and then checks them all after having processed the entire policy. It does save the line number for the assertion (but I notice that it only presently saves the line number from policy.conf; we should likely change it to also save the source file name and number that was introduced by an earlier patch by Colin), but the assertions are checked against the access vector table (avtab) created by the compilation of the policy, which does not presently preserve line number information for the allow rules. And, in fact, you can't just add a line number to the avtab nodes, as a single node may include the union of a number of allow rules from the source policy. So, what you suggest is possible, but not completely trivial.

Signature · 8 lines
Stephen Smalley <[email protected]>
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.