Skip to contentSkip to conversation

EOF missing newline bug in squid.fc / toolchain

DISCUSSION Eamon Walsh 2 participants 2 messages May 8, 2009 – May 11, 2009 SELinux security module

lore
Share & tools
lore
#0 lore raw

The file squid.fc in refpolicy has no newline at the end.

The toolchain doesn't correct for this, and squid.pp retains the missing newline, all the way to the finished file_contexts where I'm ending up with
/var/squidGuard(/.*)? system_u:object_r:squid_cache_t:s0#

(an empty comment line got mashed on), and setfiles verification fails with invalid MLS field.

Signature · 8 lines
Eamon Walsh <[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.
#1 lore raw
Quoted 8 lines · Eamon Walsh

The file squid.fc in refpolicy has no newline at the end.

The toolchain doesn't correct for this, and squid.pp retains the missing newline, all the way to the finished file_contexts where I'm ending up with
/var/squidGuard(/.*)? system_u:object_r:squid_cache_t:s0#

(an empty comment line got mashed on), and setfiles verification fails with invalid MLS field.

I fixed this in refpolicy trunk. I'll look into making sure there is an extra endline at the end of file contexts when building a module. However, the toolchain should probably add a newline between each of the modules' file contexts when they're concatenated, since it isn't required to use refpolicy infrastructure to build .pp's.

Signature · 9 lines
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150


--
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.