3 ms·
This is unlikely to change since if ping changes many programs would broke. It is kinda like ipconfig. AFAIK, ping is a setuid binary (since it needs raw socke
by m45t3r 6y ago
This is unlikely to change since if ping changes many programs would broke. It is kinda like ipconfig.
AFAIK, ping is a setuid binary (since it needs raw socket, that is a privileged operation) so a program that implements ping by itself would need to do the same (or it would work for root).
- treve 6y agoWeird! Not setuid on my ubuntu machine.
- jandrese 6y agoIt is on my Ubuntu 18.04.5 LTS machine: -rwsr-xr-x 1 root root 64424 Jun 28 2019 /bin/ping
- unionpivo 6y agoIt's because of linux capabilities specificly CAP_NET_RAW How to check: $ getcap $(which ping) /usr/bin/ping = cap_net_raw+ep More about it on [1] https://blog.container-solutions.com/linux-capabilities-in-practice https://blog.container-solutions.com/linux-capabilities-in-p...
- jlgaddis 6y agoNowadays, the CAP_NET_RAW "capability" allows opening raw sockets by unprivileged users and without making binaries setuid.
- oarsinsync 6y ago> It is kinda like ipconfig. I assumed you were talking about windows until: > AFAIK, ping is a setuid binary Which unfortunately means you’ve partly helped make the GP’s point for them. Under Linux, the command you’re thinking of is ifconfig, which has long been deprecated and doesn’t ship by default anymore in newer distributions. Times change, tools move on.