liboping icon indicating copy to clipboard operation
liboping copied to clipboard

Open raw sockets when adding hosts, not when doing the pinging

Open tfheen opened this issue 6 years ago • 3 comments

This allows this to run as non-root again, without this, oping will have dropped privileges before trying to ping, which then fails to open the necessary raw sockets.

Fixes: #34

tfheen avatar Mar 20 '18 21:03 tfheen

I've uploaded a version to Debian that includes this fix.

barak avatar Mar 21 '18 14:03 barak

Could this be related to https://github.com/octo/liboping/issues/43 - I'm using Ubuntu version which most likely includes the same fix.

ghost avatar Jan 28 '19 11:01 ghost

Hi,

this patch (or something along that lines) is necessary for oping/noping to work correctly on FreeBSD for non-root users (running suid root). "master as is" will drop privs too early, resulting in a cascade of

ping_send failed: Operation not permitted ping_send failed: Operation not permitted ping_send failed: Operation not permitted ping_send failed: Operation not permitted ping_send failed: Operation not permitted

even when installed mode 4711 (suid root). @octo can you please merge this, or something similar?

I am willing test variants on FreeBSD.

We use noping a lot, but we want the multiping patch, so we need "master + privilege dropping fix"...

thanks

cron2 avatar Feb 02 '21 18:02 cron2