Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2019-07-14 12:57:44 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2019-07-14 12:57:44 +0300
commit4829ae97221336f10ef2369b6cbf7929a62a8fb8 (patch)
tree34e439584ee9570443332a13e223df58f8c0abb6 /include/profiles
parent34f306eb0bc5502535ca85f5700fa083ab6c9443 (diff)
Long format for od does not exist on BSD
Diffstat (limited to 'include/profiles')
-rw-r--r--include/profiles8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/profiles b/include/profiles
index f8935ece..ad5e6b07 100644
--- a/include/profiles
+++ b/include/profiles
@@ -35,10 +35,8 @@
# Show deprecation message for old config entries
FOUND=0
- #DATA=$(egrep "^config:" ${PROFILE} | od --address-radix=none -t a | sed 's/ /!space!/g')
- #if ! IsEmpty "${DATA}"; then FOUND=1; fi
- # Items such as 'apache:'
- DATA=$(egrep "^[a-z-]{1,}:" ${PROFILE} | od --address-radix=none -t a | sed 's/ /!space!/g')
+ # Items such as 'config:' and 'apache:'
+ DATA=$(egrep "^[a-z-]{1,}:" ${PROFILE} | od -An -ta | sed 's/ /!space!/g') # od -An (no file offset), -ta (named character, to be on safe side)
if ! IsEmpty "${DATA}"; then FOUND=1; fi
if [ ${FOUND} -eq 1 ]; then
@@ -49,7 +47,7 @@
fi
# Security check for unexpected and possibly harmful escape characters
- DATA=$(grep -v '^$\|^ \|^#\|^config:' ${PROFILE} | tr -d '[:alnum:]/\[\]\(\)\-_\|,\.:;= \n\r' | od --address-radix=none -t a | sed 's/ /!space!/g')
+ DATA=$(grep -v '^$\|^ \|^#\|^config:' ${PROFILE} | tr -d '[:alnum:]/\[\]\(\)\-_\|,\.:;= \n\r' | od -An -ta | sed 's/ /!space!/g')
if ! IsEmpty "${DATA}"; then
DisplayWarning "Your profile '${PROFILE}' contains unexpected characters. See the log file for more information."
LogText "Found unexpected or possibly harmful characters in the profile. See output below."