liboping icon indicating copy to clipboard operation
liboping copied to clipboard

fails when run as suid root

Open tfheen opened this issue 7 years ago • 3 comments

This is a variant over https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864184.

In Debian, oping is installed suid root. In older versions, in liboping.c, doing ping_host_add would also grab a raw socket. In the current version, that is only added when ping_send is called, which is after when oping and noping have dropped their privileges, leading to ping_send failed: Operation not permitted errors.

I'm happy to provide a patch if that's useful, but as there are a few ways of solving this, some guidance would be useful. (Just creating the socket in the add_host function is probably the easiest, from a quick glance.)

tfheen avatar Mar 16 '18 21:03 tfheen

(Debian maintainer here.) Thanks, a patch would be very welcome!

barak avatar Mar 18 '18 11:03 barak

@barak, see #35 for a patch. Works for me in my super-light testing.

tfheen avatar Mar 20 '18 21:03 tfheen

dput

barak avatar Mar 21 '18 14:03 barak