[PATCH] [RHEL/6] Don't allow whitespace around equal sign in /etc/sysconfig/init
Jan Lieskovsky
jlieskov at redhat.com
Mon Apr 7 13:12:46 UTC 2014
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 && 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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-RHEL-6-Don-t-allow-whitespace-around-equal-sign-in-e.patch
Type: text/x-patch
Size: 1928 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/scap-security-guide/attachments/20140407/b38315ca/attachment.bin>
More information about the scap-security-guide
mailing list