diff options
| author | Alexander Shvedov <60114847+a-shvedov@users.noreply.github.com> | 2024-05-30 10:43:01 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-30 10:43:01 +0300 |
| commit | f8a5f1cd9ea907654f42fa06ce6b6bfd4b8c1b13 (patch) | |
| tree | 7aec2a095a30ed609ce96f85ec3c4e0a8b8eb74c /afl-system-config | |
| parent | 629edb1e78d791894ce9ee6d53259f95fe1a29af (diff) | |
| parent | e7d871c8bf64962a658e447b90a1a3b43aaddc28 (diff) | |
| download | afl++-f8a5f1cd9ea907654f42fa06ce6b6bfd4b8c1b13.tar.gz | |
Merge branch 'AFLplusplus:stable' into stable
Diffstat (limited to 'afl-system-config')
| -rwxr-xr-x | afl-system-config | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/afl-system-config b/afl-system-config index b50bb06e..7e2cb688 100755 --- a/afl-system-config +++ b/afl-system-config @@ -1,5 +1,5 @@ #!/bin/sh -test "$1" = "-h" -o "$1" = "-hh" && { +test "$1" = "-h" -o "$1" = "-hh" -o "$1" = "--help" && { echo 'afl-system-config by Marc Heuse <mh@mh-sec.de>' echo echo $0 @@ -13,6 +13,10 @@ test "$1" = "-h" -o "$1" = "-hh" && { echo configuration options. exit 0 } +if [ $# -ne 0 ]; then + echo "ERROR: Unknown option(s): $@" + exit 1 +fi DONE= PLATFORM=`uname -s` @@ -21,6 +25,7 @@ echo "WARNING: this reduces the security of the system!" echo if [ '!' "$EUID" = 0 ] && [ '!' `id -u` = 0 ] ; then echo "Warning: you need to be root to run this!" + sleep 1 # we do not exit as other mechanisms exist that allows to do this than # being root. let the errors speak for themselves. fi @@ -110,12 +115,12 @@ if [ "$PLATFORM" = "Darwin" ] ; then sysctl kern.sysv.shmall=131072000 echo Settings applied. echo - if $(launchctl list 2>/dev/null | grep -q '\.ReportCrash$') ; then + if $(launchctl list 2>/dev/null | grep -q '\.ReportCrash\>') ; then echo echo Unloading the default crash reporter SL=/System/Library; PL=com.apple.ReportCrash - launchctl unload -w ${SL}/LaunchAgents/${PL}.plist >/dev/null 2>&1 - sudo launchctl unload -w ${SL}/LaunchDaemons/${PL}.Root.plist >/dev/null 2>&1 + sudo -u "$SUDO_USER" launchctl unload -w ${SL}/LaunchAgents/${PL}.plist + launchctl unload -w ${SL}/LaunchDaemons/${PL}.Root.plist echo fi echo It is recommended to disable System Integrity Protection for increased performance. |
