Re: User-space controlled raw ethernet - Is this the way to go?



Andrew Greensted schrieb:

Is there is an easier way? Perhaps to use libpcap directly as non-root.

Essentially, libpcap does not neet root priviledge, but CAP_NET_RAW and
maybe CAP_NET_ADMIN capabilities.

man 7 capablities
man 2 capset

So a program may start as root, change inheritable capabilities and
seteuid() to non-root, then execve() the libpcap application.

Kind regards

Jan
.