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:
authorsuperpoussin22 <vincent.nadal@orange.fr>2018-09-06 08:48:40 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2018-09-06 08:48:40 +0300
commit2334bba492687f45a248ca90bd10227fa40eeed2 (patch)
treeb8983145a04e7a13553a4186fcc8efaf2e63cd9e
parent47de2dc4bf2a2c87670cff4276549930569491f8 (diff)
avoid “can't shift that many” error (#571)
got this error on debian auditing a docker file when testing an ubuntu Dockerfile when lynis try to find KEY_USED
-rw-r--r--include/functions6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/functions b/include/functions
index e4776ed8..39dd8697 100644
--- a/include/functions
+++ b/include/functions
@@ -496,11 +496,11 @@
INDENT=$1
;;
--result)
- shift
+ shift $(( $# > 0 ? 1 : 0 ))
RESULT=$1
;;
--text)
- shift
+ shift $(( $# > 0 ? 1 : 0 ))
TEXT=$1
;;
*)
@@ -509,7 +509,7 @@
;;
esac
# Go to next parameter
- shift
+ shift $(( $# > 0 ? 1 : 0 ))
done
if [ -z "${RESULT}" ]; then