<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 4/7/14, 6:12 AM, Jan Lieskovsky
      wrote:<br>
    </div>
    <blockquote
      cite="mid:640923327.484294.1396876366900.JavaMail.zimbra@redhat.com"
      type="cite">
      <div class="moz-text-plain" wrap="true" graphical-quote="true"
        style="font-family: -moz-fixed; font-size: 12px;"
        lang="x-unicode">
        <pre wrap="">When checking /etc/sysconfig/init file for the PROMPT row,
don't allow whitespace characters around the equal sign, since
it's invalid configuration [*].

But comments can be present after the setting, so count with
them (don't fail when the settings meets the criteria, but
there's comment present at the same line yet).

Please review.

Thank you &amp;&amp; Regards, Jan.
--
Jan iankko Lieskovsky / Red Hat Security Technologies Team

[*] /etc/sysconfig/init script has format of a Bash script --
    is run within e.g. /etc/init.d/functions script by each
    service status check etc. Whitespace around equal sign
    result into warning like:

   /etc/sysconfig/init: line 28: no: command not found

   when the PROMPT line has had the form of:

   ^PROMPT=\tno

   But comments are allowed (no warning in the same situation
   when PROMPT line has the proper syntax)
</pre>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"><legend
          class="mimeAttachmentHeaderName">0001-RHEL-6-Don-t-allow-whitespace-around-equal-sign-in-e.patch</legend></fieldset>
      <br>
      <div class="moz-text-plain" wrap="true" graphical-quote="true"
        style="font-family: -moz-fixed; font-size: 12px;"
        lang="x-western">
        <pre wrap="">From d14395814d42ee5c732ce4805c1cbbe521268a4a Mon Sep 17 00:00:00 2001
From: Jan Lieskovsky <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:jlieskov@redhat.com">&lt;jlieskov@redhat.com&gt;</a>
Date: Mon, 7 Apr 2014 14:56:41 +0200
Subject: [PATCH] [RHEL/6] Don't allow whitespace around equal sign in
 /etc/sysconfig/init,          when retrieving PROMPT value (it's invalid
 setting). But allow          trailing comments.

Signed-off-by: Jan Lieskovsky <a moz-do-not-send="true" class="moz-txt-link-rfc2396E" href="mailto:jlieskov@redhat.com">&lt;jlieskov@redhat.com&gt;</a>
---
 RHEL/6/input/checks/disable_interactive_boot.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/RHEL/6/input/checks/disable_interactive_boot.xml b/RHEL/6/input/checks/disable_interactive_boot.xml
index 1a4f55b..bf5e89c 100644
--- a/RHEL/6/input/checks/disable_interactive_boot.xml
+++ b/RHEL/6/input/checks/disable_interactive_boot.xml
@@ -1,5 +1,5 @@
 &lt;def-group&gt;
-  &lt;definition class="compliance" id="disable_interactive_boot" version="1"&gt;
+  &lt;definition class="compliance" id="disable_interactive_boot" version="2"&gt;
     &lt;metadata&gt;
       &lt;title&gt;Disable Interactive Boot&lt;/title&gt;
       &lt;affected family="unix"&gt;
@@ -7,7 +7,7 @@
       &lt;/affected&gt;
       &lt;description&gt;The ability for users to perform interactive startups should
       be disabled.&lt;/description&gt;
-      &lt;reference source="swells" ref_id="20130914" ref_url="test_attestation" /&gt;
+      &lt;reference source="JL" ref_id="20140407" ref_url="test_attestation" /&gt;
     &lt;/metadata&gt;
     &lt;criteria&gt;
       &lt;criterion test_ref="test_disable_interactive_boot" /&gt;
@@ -21,9 +21,9 @@
   &lt;/ind:textfilecontent54_test&gt;
 
   &lt;ind:textfilecontent54_object id="object_disable_interactive_boot"
-  version="1"&gt;
+  version="2"&gt;
     &lt;ind:filepath&gt;/etc/sysconfig/init&lt;/ind:filepath&gt;
-    &lt;ind:pattern operation="pattern match"&gt;^[\s]*PROMPT[\s]*=[\s]*no[\s]*$&lt;/ind:pattern&gt;
+    &lt;ind:pattern operation="pattern match"&gt;^[\s]*PROMPT=no[\s]+&lt;/ind:pattern&gt;
     &lt;ind:instance datatype="int"&gt;1&lt;/ind:instance&gt;
   &lt;/ind:textfilecontent54_object&gt;
 
<div class="moz-txt-sig">-- 
1.8.3.1
</div></pre>
      </div>
    </blockquote>
    <br>
    Great bugfix! This doesn't appear to have been acked.<br>
    <br>
    Ack<br>
  </body>
</html>