#!/bin/sh
# DF-0599 run: trigger the smb_vc_create NULL-iod panic.
# MUST run as root: /dev/nsmb is mode 0700 root:wheel (smb_dev.c:356).
# The netsmb stack must be loaded: kldload smbfs   (creates /dev/nsmb).
id
set -e
cd "$(dirname "$0")"
echo "[*] ensuring smbfs module loaded..."
kldstat -q -m smbfs || kldload smbfs
ls -l /dev/nsmb
echo "[*] running trigger..."
./panic
echo "[!] if you see this, the kernel did NOT panic (fix worked)"
