mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-06-07 15:02:40 -04:00
Check for more locations of System.map
This commit is contained in:
parent
373e8733d3
commit
6846a94327
1 changed files with 4 additions and 2 deletions
|
@ -5,8 +5,10 @@
|
||||||
|
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
|
|
||||||
|
system_map_location="/boot/System.map* /usr/src/*/System.map* /lib/modules/*/*/System.map* /System.map*"
|
||||||
|
|
||||||
counter=0
|
counter=0
|
||||||
for filename in /boot/System.map* ; do
|
for filename in ${system_map_location} ; do
|
||||||
counter=$(( counter + 1 ))
|
counter=$(( counter + 1 ))
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -15,7 +17,7 @@ if [ "$counter" -ge "1" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## Removes the System.map files as they are only used for debugging or malware.
|
## Removes the System.map files as they are only used for debugging or malware.
|
||||||
for filename in /boot/System.map* ; do
|
for filename in ${system_map_location} ; do
|
||||||
if [ -f "${filename}" ]; then
|
if [ -f "${filename}" ]; then
|
||||||
rm --verbose --force "${filename}"
|
rm --verbose --force "${filename}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue