This should work.
Ellie, can you remove a dup in master.c too?
These aren't duplicated (except in your email). If you read closely,
the second one has the opposite #if condition from the first.
master needs root privileges to initialise its services, unless libcap
is available. What is going on here is:
1) If libcap is available, drop root now, we don't need it anymore
2) Initialise services
3) If libcap is not available, drop root now, we don't need it anymore
Ups... sorry... I needed some sleep :(
Regards