mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-31 01:34:23 +02:00
Comment out unused function RealFilename
This commit is contained in:
parent
526c519300
commit
a59731405f
@ -1094,36 +1094,37 @@
|
|||||||
# Name : RealFilename()
|
# Name : RealFilename()
|
||||||
# Description : Return file behind a symlink
|
# Description : Return file behind a symlink
|
||||||
# Returns : sFILE
|
# Returns : sFILE
|
||||||
RealFilename()
|
# Notes : This function is unused, use ShowSymlinkPath instead
|
||||||
{
|
#RealFilename()
|
||||||
sFILE=$1
|
# {
|
||||||
FileIsWorldExecutable=""
|
# sFILE=$1
|
||||||
SYMLINK=0
|
# FileIsWorldExecutable=""
|
||||||
|
# SYMLINK=0
|
||||||
# Check for symlink
|
#
|
||||||
if [ -L ${sFILE} ]; then
|
# # Check for symlink
|
||||||
if [ ! "${READLINKBINARY}" = "" ]; then
|
# if [ -L ${sFILE} ]; then
|
||||||
tFILE=`${READLINKBINARY} -f ${sFILE}`
|
# if [ ! "${READLINKBINARY}" = "" ]; then
|
||||||
# Check if we can find the file now
|
# tFILE=`${READLINKBINARY} -f ${sFILE}`
|
||||||
if [ -f ${tFILE} ]; then
|
# # Check if we can find the file now
|
||||||
rFILE="${tFILE}"
|
# if [ -f ${tFILE} ]; then
|
||||||
logtext "Result: symlink found, pointing to ${sFILE}"
|
# rFILE="${tFILE}"
|
||||||
SYMLINK=1
|
# logtext "Result: symlink found, pointing to ${sFILE}"
|
||||||
else
|
# SYMLINK=1
|
||||||
# Check the full path of the symlink, strip the filename, copy the path and linked filename together
|
# else
|
||||||
tDIR=`echo ${sFILE} | awk '{match($1, "^.*/"); print substr($1, 1, RLENGTH-1)}'`
|
# # Check the full path of the symlink, strip the filename, copy the path and linked filename together
|
||||||
tFILE="${tDIR}/${tFILE}"
|
# tDIR=`echo ${sFILE} | awk '{match($1, "^.*/"); print substr($1, 1, RLENGTH-1)}'`
|
||||||
if [ -f ${tFILE} ]; then
|
# tFILE="${tDIR}/${tFILE}"
|
||||||
rFILE="${tFILE}"
|
# if [ -f ${tFILE} ]; then
|
||||||
logtext "Result: symlink found, seems to be ${rFILE}"
|
# rFILE="${tFILE}"
|
||||||
fi
|
# logtext "Result: symlink found, seems to be ${rFILE}"
|
||||||
fi
|
# fi
|
||||||
fi
|
# fi
|
||||||
else
|
# fi
|
||||||
# No symlink
|
# else
|
||||||
rFILE="${sFILE}"
|
# # No symlink
|
||||||
fi
|
# rFILE="${sFILE}"
|
||||||
}
|
# fi
|
||||||
|
# }
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user