[PATCH 2/4] incomplete support file for bash remediations * does at least warn when undefined variable exists

Jeffrey Blank blank at eclipse.ncsc.mil
Sun Jun 2 19:05:20 UTC 2013


Signed-off-by: Jeffrey Blank <blank at eclipse.ncsc.mil>
---
 RHEL6/input/fixes/bash/templates/support.sh |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
 create mode 100644 RHEL6/input/fixes/bash/templates/support.sh

diff --git a/RHEL6/input/fixes/bash/templates/support.sh b/RHEL6/input/fixes/bash/templates/support.sh
new file mode 100644
index 0000000..e25ce4d
--- /dev/null
+++ b/RHEL6/input/fixes/bash/templates/support.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+function populate {
+# code to populate environment variables needed (for unit testing)
+if [ -z "${!1}" ]; then
+	echo "$1 is not defined. Exiting."
+	exit
+fi
+}
-- 
1.7.1



More information about the scap-security-guide mailing list