> IIRC freebsd ping sandboxes
I thought a bit about sandboxing with Capsicum. Let’s look at it: a setuid'ed program drops all privileges ASAP after starting (i.e. it opens raw sockets and drops suid privileges in the case of setuid, drops all extra capabilities in the case of cap_net_raw, or enters sandbox mode with cap_enter()). This is more or less the same approach: dropping extra permissions immediately upon startup. The main difference (for a binary that needs raw sockets) is that in the case of setuid+Capsicum the executable remains a setuid binary, whereas in the case of cap_net_raw it is not.
If it's described correctly, then a need-raw-socket-executable-file is still setuid'ed even using Capsicum for further sandboxing.