Libcap support for dropping privileges
On Linux we use libcap-ng to drop privileges after startup. Currently libcap-ng supports Linux only, so we need a different solution for FreeBSD and Mac OS X.
Using libcap would likely work.
- A solution would have to be coded up into src/util-privs.c.
- As much as possible the API should remain the same.
- configure.in/autotools need to auto detect presence and usability of libcap
- libcap-ng (if present) needs to have preference over libcap
Alternatively, libcap-ng could be improved. The upstream dev has indicated to be willing to accept patches for other operating systems.