[PATCH 0/2] rootless ping support
Radoslav Kolev
radoslav.kolev at suse.com
Tue Apr 15 08:33:17 UTC 2025
For a long time Linux has supported using dgram sockets
to avoid requiring root privileges or a setuid ping binary.
This patch is inspired by a patch Alpine linux carries
(https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/main/busybox/0015-ping-make-ping-work-without-root-privileges.patch)
but with a number of improvements:
* The rootless option is configurable, and disabled by default, so no
concerns about size increase for those that don't want/need it
* The original patch only works if the fancy output option is enabled
* With fancy option enabled, it always returned 42 as the ttl value
for ipv4
I'm currently doing some more test, but so far it seems to work well
for me. Any comments/suggestions/testing is welcome.
Best regards,
Radoslav
Radoslav Kolev (2):
Add optional rootless ping support
Add using_dgram as member of globals struct
networking/ping.c | 346 +++++++++++++++++++++++++++++++++-------------
1 file changed, 253 insertions(+), 93 deletions(-)
--
2.47.1
More information about the busybox
mailing list