aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdisable_prot.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/disable_prot.sh b/disable_prot.sh
index 54cc3be..dba1bc0 100755
--- a/disable_prot.sh
+++ b/disable_prot.sh
@@ -1,12 +1,19 @@
#!/bin/bash
if [ `id -u` -ne 0 ]; then
- echo "$0: This script should be run as root"
+ echo "$0: This script should be run as root."
echo "$0: Try to get root .."
su -l root -c "$(readlink -f $0)"
exit $?
fi
+cat /proc/cpuinfo | grep -oq pae 2>/dev/null >/dev/null
+ret=$?
+if [ $ret -eq 0 ]; then
+ echo "$0: PAE enabled system found."
+ echo "$0: Some exploits will not work!"
+fi
+
sysctl -w kernel.randomize_va_space=0 2>/dev/null
sysctl -w kernel.exec-shield=0 2>/dev/null
echo "done."