#!/bin/sh set -e #DEBHELPER# case "$1" in configure) # Set narrow capabilities for packet capture and eBPF support without requiring root/sudo. # If eBPF capabilities are unavailable, fall back to packet capture only; # rustnet will degrade to procfs process detection rather than auto-grant CAP_SYS_ADMIN. if command -v setcap >/dev/null 2>&1; then # CAP_NET_RAW: read-only packet capture (non-promiscuous mode) # CAP_BPF, CAP_PERFMON: eBPF support for enhanced process tracking setcap 'cap_net_raw,cap_bpf,cap_perfmon+eip' /usr/bin/rustnet 2>/dev/null || \ setcap 'cap_net_raw+eip' /usr/bin/rustnet || true fi cat <