mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-26 23:34:25 +02:00
Altered symlink function, message display, small cleanups
This commit is contained in:
parent
0378677ea9
commit
ebdee5b0d2
@ -46,7 +46,7 @@
|
|||||||
if [ -L ${SCANDIR} ]; then
|
if [ -L ${SCANDIR} ]; then
|
||||||
logtext "Result: directory exists, but is actually a symlink"
|
logtext "Result: directory exists, but is actually a symlink"
|
||||||
ShowSymlinkPath ${SCANDIR}
|
ShowSymlinkPath ${SCANDIR}
|
||||||
if [ ${FOUNDPATH} -eq 1 -a -d ${sFILE} ]; then
|
if [ ${FOUNDPATH} -eq 1 -a -d ${rFILE} ]; then
|
||||||
# Set path to new location
|
# Set path to new location
|
||||||
logtext "Result: found the path behind this symlink (${SCANDIR} --> ${sFILE})"
|
logtext "Result: found the path behind this symlink (${SCANDIR} --> ${sFILE})"
|
||||||
ORGPATH="${SCANDIR}"
|
ORGPATH="${SCANDIR}"
|
||||||
|
@ -850,7 +850,7 @@
|
|||||||
# Check for symlink
|
# Check for symlink
|
||||||
if [ -L ${sFILE} ]; then
|
if [ -L ${sFILE} ]; then
|
||||||
if [ ! "${READLINKBINARY}" = "" ]; then
|
if [ ! "${READLINKBINARY}" = "" ]; then
|
||||||
tFILE=`${READLINKBINARY} ${sFILE}`
|
tFILE=`${READLINKBINARY} -f ${sFILE}`
|
||||||
# Check if we can find the file now
|
# Check if we can find the file now
|
||||||
if [ -f ${tFILE} ]; then
|
if [ -f ${tFILE} ]; then
|
||||||
rFILE="${tFILE}"
|
rFILE="${tFILE}"
|
||||||
@ -862,12 +862,12 @@
|
|||||||
tFILE="${tDIR}/${tFILE}"
|
tFILE="${tDIR}/${tFILE}"
|
||||||
if [ -f ${tFILE} ]; then
|
if [ -f ${tFILE} ]; then
|
||||||
rFILE="${tFILE}"
|
rFILE="${tFILE}"
|
||||||
logtext "Result: symlink found, seems to be ${sFILE}"
|
logtext "Result: symlink found, seems to be ${rFILE}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# No symlinke
|
# No symlink
|
||||||
rFILE="${sFILE}"
|
rFILE="${sFILE}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -1183,7 +1183,7 @@
|
|||||||
# Check for symlink
|
# Check for symlink
|
||||||
if [ -L ${sFILE} ]; then
|
if [ -L ${sFILE} ]; then
|
||||||
if [ ! "${READLINKBINARY}" = "" ]; then
|
if [ ! "${READLINKBINARY}" = "" ]; then
|
||||||
tFILE=`${READLINKBINARY} ${sFILE}`
|
tFILE=`${READLINKBINARY} -f ${sFILE}`
|
||||||
# Check if we can find the file now
|
# Check if we can find the file now
|
||||||
if [ -f ${tFILE} ]; then
|
if [ -f ${tFILE} ]; then
|
||||||
sFILE="${tFILE}"
|
sFILE="${tFILE}"
|
||||||
@ -1199,7 +1199,6 @@
|
|||||||
tFILE="${tDIR}/${tFILE}"
|
tFILE="${tDIR}/${tFILE}"
|
||||||
if [ -L ${tFILE} ]; then
|
if [ -L ${tFILE} ]; then
|
||||||
logtext "Result: this symlink links to another symlink"
|
logtext "Result: this symlink links to another symlink"
|
||||||
# Trying it with -f option
|
|
||||||
tFILE=`${READLINKBINARY} -f ${tFILE}`
|
tFILE=`${READLINKBINARY} -f ${tFILE}`
|
||||||
if [ -f ${tFILE} ]; then
|
if [ -f ${tFILE} ]; then
|
||||||
sFILE="${tFILE}"
|
sFILE="${tFILE}"
|
||||||
|
2
lynis
2
lynis
@ -268,11 +268,9 @@
|
|||||||
echo " requesting support. Due the nature of beta releases, it"
|
echo " requesting support. Due the nature of beta releases, it"
|
||||||
echo " is possible new features give unexpected warnings."
|
echo " is possible new features give unexpected warnings."
|
||||||
echo ""
|
echo ""
|
||||||
echo " Press [ENTER] to continue or [CTRL] + C to break"
|
|
||||||
echo ""
|
echo ""
|
||||||
echo " #########################################################"
|
echo " #########################################################"
|
||||||
echo "${NORMAL}"; echo ""
|
echo "${NORMAL}"; echo ""
|
||||||
if [ ${NEVERBREAK} -eq 0 ]; then read void; fi
|
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
#################################################################################
|
#################################################################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user