about summary refs log tree commit diff
path: root/afl-system-config
diff options
context:
space:
mode:
Diffstat (limited to 'afl-system-config')
-rwxr-xr-xafl-system-config10
1 files changed, 7 insertions, 3 deletions
diff --git a/afl-system-config b/afl-system-config
index 5ad9d937..e08871ac 100755
--- a/afl-system-config
+++ b/afl-system-config
@@ -22,7 +22,10 @@ if [ '!' "$EUID" = 0 ] && [ '!' `id -u` = 0 ] ; then
 fi
 if [ "$PLATFORM" = "Linux" ] ; then
 {
-  sysctl -w kernel.core_pattern=core
+  sysctl -w kernel.core_uses_pid=0
+  # Arch Linux requires core_pattern to be empty :(
+  test -e /etc/arch-release && sysctl -w kernel.core_pattern=
+  test -e /etc/arch-release || sysctl -w kernel.core_pattern=core
   sysctl -w kernel.randomize_va_space=0
   sysctl -w kernel.sched_child_runs_first=1
   sysctl -w kernel.sched_autogroup_enabled=1
@@ -86,14 +89,15 @@ if [ "$PLATFORM" = "NetBSD" ] ; then
   DONE=1
 fi
 if [ "$PLATFORM" = "Darwin" ] ; then
+  sysctl kern.sysv.shmmax=8388608
+  sysctl kern.sysv.shmseg=48
+  sysctl kern.sysv.shmall=98304
   if [ $(launchctl list 2>/dev/null | grep -q '\.ReportCrash$') ] ; then
     echo We unload the default crash reporter here
     SL=/System/Library; PL=com.apple.ReportCrash
     launchctl unload -w ${SL}/LaunchAgents/${PL}.plist
     sudo launchctl unload -w ${SL}/LaunchDaemons/${PL}.Root.plist
     echo Settings applied.
-  else
-    echo Nothing to do.
   fi
   DONE=1
 fi