DF-0860 / run.sh
#!/bin/sh # DF-0860 run script. # # REQUIRES: root (the netgraph control socket needs SYSCAP_RESTRICTEDROOT, # euid 0) AND `kldload ng_socket` (root) first. # # Optional: pass an integer leak_bytes (default 128), or set LEAK_BYTES. set -e cd "$(dirname "$0")" # Make sure the netgraph socket module is loaded (root). if [ "$(id -u)" != "0" ]; then echo "DF-0860: must run as root (netgraph control socket requires euid 0)" >&2 exit 2 fi kldload -n ng_socket 2>/dev/null || true LEAK="${1:-${LEAK_BYTES:-128}}" echo "# running as $(id)" echo "# leak_bytes (lying arglen) = $LEAK" ./df0860 "$LEAK" |