aboutsummaryrefslogtreecommitdiff
path: root/disable_prot.sh
blob: 15e8137eb67f56bd33187f8cf3274731e831afd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

if [ `id -u` -ne 0 ]; then
  echo "$0: This program should be run as root"
  echo "$0: Try to get root .."
  su -l root -c "$(realpath $0)"
  exit $?
fi

sysctl -w kernel.randomize_va_space=0 2>/dev/null
sysctl -w kernel.exec-shield=0 2>/dev/null
echo "done."