#!/bin/sh
# DF-0793 build: the async-disk KLD + the syscall harness.
# Run as the unprivileged user (maxx). Produces asyncd.ko + trim_uaf.
set -e
cd "$(dirname "$0")"
echo "++ building asyncd KLD (needs /usr/src kernel source tree)..."
make KMOD=asyncd
echo "++ building userspace harness..."
cc -O2 -o trim_uaf trim_uaf.c
echo "BUILD_EXIT=0"
ls -l asyncd.ko trim_uaf
