50 lines
1.5 KiB
Plaintext
50 lines
1.5 KiB
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
#################################################################################
|
||
|
#
|
||
|
# Author: Thomas Biege <thomas@suse.de>
|
||
|
#
|
||
|
# Lynis comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
|
||
|
# welcome to redistribute it under the terms of the GNU General Public License.
|
||
|
# See LICENSE file for usage of this software.
|
||
|
#
|
||
|
#################################################################################
|
||
|
#
|
||
|
# Looks up symlinks in /tmp
|
||
|
#
|
||
|
#################################################################################
|
||
|
#
|
||
|
# TODO:
|
||
|
# - also verify other tmp localtions like /var/tmp and ~/tmp
|
||
|
#
|
||
|
################################################################################
|
||
|
#
|
||
|
InsertSection "File systems"
|
||
|
#
|
||
|
#################################################################################
|
||
|
#
|
||
|
# Test : FILE-7526
|
||
|
# Description : Looks up symlinks in /tmp
|
||
|
Register --test-no FILE-7526 --weight L --network NO --description "Looks up symlinks in /tmp"
|
||
|
if [ ${SKIPTEST} -eq 0 ]; then
|
||
|
Display --indent 2 --text "- Starting look-up of symlinks in /tmp..."
|
||
|
logtext "Test: Checking /tmp for symlinks"
|
||
|
|
||
|
TMP_SYMLINK=$(find /tmp -type l -print 2>/dev/null)
|
||
|
|
||
|
if [ "$TMP_SYMLINK" ]
|
||
|
then
|
||
|
for sym in $TMP_SYMLINK
|
||
|
do
|
||
|
Display --indent 4 --text "${sym}" --result WARNING --color RED
|
||
|
done
|
||
|
fi
|
||
|
fi
|
||
|
#
|
||
|
#################################################################################
|
||
|
#
|
||
|
|
||
|
wait_for_keypress
|
||
|
|
||
|
#
|
||
|
#================================================================================
|