#!/bin/sh
# DF-3062 run (guest, root; unprivileged trigger post-mount):
#   kldload ext2fs
#   /root/vntool attach 0 /root/df3062.img
#   mount -t ext2fs /dev/vn0 /mnt/e2 && touch /mnt/e2/x
# stock kernel  -> Fatal trap 12 in memset (see panic.txt)
# fixed module  -> AFTER-TRIGGER-NO-PANIC (see run.2.log)
set -e
kldload ext2fs
/root/vntool attach 0 /root/df3062.img
mkdir -p /mnt/e2
mount -t ext2fs /dev/vn0 /mnt/e2
touch /mnt/e2/x
echo AFTER-TRIGGER-NO-PANIC
