Hacker News new | past | comments | ask | show | jobs | submit login

Weird! Not setuid on my ubuntu machine.



It'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-p...


It is on my Ubuntu 18.04.5 LTS machine:

  -rwsr-xr-x 1 root root 64424 Jun 28  2019 /bin/ping


No longer on 20.10. Curious why it's different:

-rwxr-xr-x 1 root root 76744 Aug 23 15:08 /bin/ping


Checked an Ubuntu 20 machine and you're right. Instead ping has an extended attribute:

  % getcap /bin/ping
  /bin/ping = cap_net_raw+ep




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: