Created attachment 361256 [details] output from USE="-drop-root" emerge tcpdump When trying to build tcpdump with USE="-drop-root" I can still see --with-user=tcpdump in the configure output. Shouldn't this use flag cause it to compile without dropping root privileges?
Fixed in 4.5.1.
Created attachment 364682 [details, diff] patch against tcpdump-4.5.1.ebuild, includes hateful sed hack Bah, that didn't fix it because its build system's configure when takes --without-user and makes it --with-user="no", doesn't check for the latter to skip any action, so it creates a crazy entry: #define WITH_USER "no" in config.h which results to the funny: ((~amd64-pure)) Jupiter tcpdump # tcpdump -i enp2s0 not port 9999 tcpdump: Couldn't find user 'no' ((~amd64-pure)) Jupiter tcpdump # output. The sed hack in my patch fixes this for the time being but upstream should be informed (didn't do it cause I don't have a github account yet) or we should not give at all --without-user when !drop-root if they reject to fix it (they have it as it is by design). I open this again as it hit me and hit me hard.
of course, now that I think about it again, rightttt, there could be at some system a "no" user, so maybe a $(use drop-root && echo -n "--with-user=tcpdump") in place of $(use_with drop-root user tcpdump) or some similar logic would do trick.
back to netmon, I pressed accidentally the button to assign to myself. I can commit this myself if someone gives the ack.
with 4.5.1: ozzie ~ # tcpdump -w test.pcap -i wlan0 tcpdump: Couldn't find user 'no' with hateful sed hack: ozzie ~ # tcpdump -w test.pcap -i wlan0 tcpdump: listening on wlan0, link-type EN10MB (Ethernet), capture size 65535 bytes I really don't love this fix, but works is works. Anyone who has a better solution which is actually tested and confirmed is welcome to provide it. + 06 Dec 2013; Rick Farina <zerochaos@gentoo.org> +tcpdump-4.5.1-r1.ebuild: + fix for bug #488522 thanks to pchrist