DragonFlyBSD Kernel Audit
DF-0825 / run.sh
← back to finding ↓ download raw
#!/bin/sh
# DF-0825 harness run script — loads the KLD module and shows the result.
# Run as root. Shows the off-by-4 on unpatched kernels; shows the fix on patched.
set -e
cd "$(dirname "$0")"

ssh -F ../../dfbsd-qemu/config dfbsd /bin/sh <<'RUNEOF'
dmesg -c >/dev/null 2>&1
kldload /usr/src/sys/test/df0825_harness/df0825_harness.ko 2>&1
echo "KLDLOAD_RC=$?"
echo "--- harness output ---"
dmesg 2>&1 | grep "DF-0825:"
kldunload df0825_harness 2>/dev/null || true
RUNEOF