Research
.
Skip Search Box

SELinux Mailing List

Re: policy hierarchy patch

From: Stephen Smalley <sds_at_tycho.nsa.gov>
Date: Wed, 13 Apr 2005 12:16:12 -0400


On Wed, 2005-04-06 at 16:38 -0500, Darrel Goeddel wrote:
> There is a slightly modified behavior with this patch. Previously, if you
> specified a category that did not exist (or was not allowed to be associated
> with the specified sensitivity) in a context or rule with mls portions, the
> compiler would issue a warning and keep on chugging. This generated a perfectly
> nice policy, but you may not be getting what you wanted due to a typo or
> misconfiguration because you missed a warning. The compiler now treats these
> circumstances as errors just as if you tried to use a type that does not exist
> in an allow rule.

Just to clarify, anytime the compiler calls yyerror (which it was doing for these errors), it was incrementing policydb_errors, and checkpolicy checks policydb_errors after yyparse() returns and bails out at that point if it is non-zero. Hence, the compiler wasn't treating them as just warnings, but was proceeding to parse the rest of the policy since the error didn't prevent continued processing (e.g. so that if you had several such errors, they would all get reported in one pass rather than having to repeatedly fix-and-compile, fix-and-compile, ...).

-- 
Stephen Smalley <sds@tycho.nsa.gov>
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
Received on Wed 13 Apr 2005 - 12:34:35 EDT
 

Date Posted: Jan 15, 2009 | Last Modified: Jan 15, 2009 | Last Reviewed: Jan 15, 2009

 
bottom

National Security Agency / Central Security Service