mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-12-25 12:39:24 -05:00
Merge pull request #13 from madaidan/patch-9
Remove System.map and restrict the SysRq key.
This commit is contained in:
commit
5e02100e34
2
etc/sysctl.d/sysrq.conf
Normal file
2
etc/sysctl.d/sysrq.conf
Normal file
@ -0,0 +1,2 @@
|
||||
# Allow only rebooting/shutting down with the SysRq key.
|
||||
kernel.sysrq=128
|
9
lib/systemd/system/remove-system-map.service
Normal file
9
lib/systemd/system/remove-system-map.service
Normal file
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Removes the System.map files
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/lib/security-misc/remove-system.map
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
14
usr/lib/security-misc/remove-system.map
Normal file
14
usr/lib/security-misc/remove-system.map
Normal file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
## Copyright (C) 2012 - 2018 ENCRYPTED SUPPORT LP <adrelanos@riseup.net>
|
||||
## See the file COPYING for copying conditions.
|
||||
|
||||
shopt -s nullglob
|
||||
|
||||
# Removes the System.map files as they are only used for debugging or malware.
|
||||
for filename in /boot/System.map-*
|
||||
do
|
||||
if [ -f "${filename}" ]; then
|
||||
rm -f "${filename}"
|
||||
fi
|
||||
done
|
Loading…
Reference in New Issue
Block a user