mirror of https://github.com/CISOfy/lynis.git
Perform compressed uploads by default
This commit is contained in:
parent
252f774f57
commit
040c2efc1c
|
@ -60,6 +60,7 @@ unset LANG
|
||||||
COMPLIANCE_ENABLE_PCI_DSS=0
|
COMPLIANCE_ENABLE_PCI_DSS=0
|
||||||
COMPLIANCE_TESTS_PERFORMED=0
|
COMPLIANCE_TESTS_PERFORMED=0
|
||||||
COMPLIANCE_FINDINGS_FOUND=0
|
COMPLIANCE_FINDINGS_FOUND=0
|
||||||
|
COMPRESSED_UPLOADS=1
|
||||||
CONTROL_URL_APPEND=""
|
CONTROL_URL_APPEND=""
|
||||||
CONTROL_URL_PREPEND=""
|
CONTROL_URL_PREPEND=""
|
||||||
CSUMBINARY=""
|
CSUMBINARY=""
|
||||||
|
@ -112,7 +113,6 @@ unset LANG
|
||||||
OS=""; OS_MODE=""
|
OS=""; OS_MODE=""
|
||||||
OS_REDHAT_OR_CLONE=0
|
OS_REDHAT_OR_CLONE=0
|
||||||
OSIRISBINARY=""
|
OSIRISBINARY=""
|
||||||
OPTIONS_COMPRESSED_UPLOADS=1
|
|
||||||
PASSWORD_MAXIMUM_DAYS=-1
|
PASSWORD_MAXIMUM_DAYS=-1
|
||||||
PASSWORD_MINIMUM_DAYS=-1
|
PASSWORD_MINIMUM_DAYS=-1
|
||||||
PAM_2F_AUTH_ENABLED=0
|
PAM_2F_AUTH_ENABLED=0
|
||||||
|
|
|
@ -138,7 +138,12 @@ output "Settings file: ${SETTINGS_FILE}"
|
||||||
# Try to connect
|
# Try to connect
|
||||||
output "Uploading data.."
|
output "Uploading data.."
|
||||||
logtext "Command used: ${CURLBINARY} ${CURL_OPTIONS} -s -S --data-urlencode \"data@${REPORTFILE}\" --data-urlencode \"licensekey=${LICENSE_KEY}\" --data-urlencode \"hostid=${HOSTID}\" ${UPLOAD_URL}"
|
logtext "Command used: ${CURLBINARY} ${CURL_OPTIONS} -s -S --data-urlencode \"data@${REPORTFILE}\" --data-urlencode \"licensekey=${LICENSE_KEY}\" --data-urlencode \"hostid=${HOSTID}\" ${UPLOAD_URL}"
|
||||||
UPLOAD=`${CURLBINARY} ${CURL_OPTIONS} -s -S --data-urlencode "data@${REPORTFILE}" --data-urlencode "licensekey=${LICENSE_KEY}" --data-urlencode "hostid=${HOSTID}" ${UPLOAD_URL} 2> /dev/null`
|
# Add a space
|
||||||
|
CURL_OPTIONS=" ${CURL_OPTIONS}"
|
||||||
|
if [ ${COMPRESSED_UPLOADS} -eq 1 ]; then
|
||||||
|
CURL_OPTIONS="${CURL_OPTIONS} --compressed"
|
||||||
|
fi
|
||||||
|
UPLOAD=`${CURLBINARY}${CURL_OPTIONS} -s -S --data-urlencode "data@${REPORTFILE}" --data-urlencode "licensekey=${LICENSE_KEY}" --data-urlencode "hostid=${HOSTID}" ${UPLOAD_URL} 2> /dev/null`
|
||||||
EXITCODE=$?
|
EXITCODE=$?
|
||||||
if [ ${EXITCODE} -gt 0 ]; then
|
if [ ${EXITCODE} -gt 0 ]; then
|
||||||
echo "${RED}Error: ${NORMAL}Error occurred, cURL ended during the upload of the report data."
|
echo "${RED}Error: ${NORMAL}Error occurred, cURL ended during the upload of the report data."
|
||||||
|
|
|
@ -175,7 +175,7 @@
|
||||||
|
|
||||||
# Compression of uploads (enabled by default)
|
# Compression of uploads (enabled by default)
|
||||||
upload_compressed)
|
upload_compressed)
|
||||||
if [ "${VALUE}" = "0" ]; then OPTIONS_COMPRESSED_UPLOADS=1 ]; fi
|
if [ "${VALUE}" = "0" ]; then COMPRESSED_UPLOADS=1 ]; fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Options during upload of data
|
# Options during upload of data
|
||||||
|
|
Loading…
Reference in New Issue