Research Menu

.
Skip Search Box

SELinux Mailing List

[ SEMANAGE ] Assert whitespace between records

From: Ivan Gyurdiev <ivg2_at_cornell.edu>
Date: Fri, 04 Nov 2005 13:31:02 -0500


This patch will assert there is whitespace between seuser, boolean, interface, and port records (assert whitespace after each record). This has no effect on ports and interfaces, because they already check for that when looking for where the context ends (added for clarity only). Users don't require a space, because they have a semicolon.

In the case of seusers, this prevents parser confusion when MLS is disabled, and we encounter an MLS context: a:b:c - complain about lack of whitespace, rather than treating the ":" as the next seuser, and saying something like: nonempty string expected, or whatever...

In the case of booleans, this change will consider a=TRUEb=false or things like that as a parse error.

This change will succeed on the last record, and at the end of each line, because the terminating '\0' is considered whitespace - it's present on all lines, including the last one. It will not succeed if you called skip_space right before that, because that zeros the buffer on EOF (intentionally).

--
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 Fri 4 Nov 2005 - 13:24:16 EST
 

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

 
bottom

National Security Agency / Central Security Service