3 ms·
Regarding setuid, this is why when you run programs like ping(8) it doesn't require root access to open a raw socket. ping's setuid is set so upon execution it
by halayli 9y ago
Regarding setuid, this is why when you run programs like ping(8) it doesn't require root access to open a raw socket. ping's setuid is set so upon execution it executes as root since ping is owned by root and then calls setuid(getuid()) to run as the intended user.
- Huggernaut 9y agoIn some distributions, ping is now no longer setuid, but instead setcap with CAP_NET_RAW to narrow down the privileges gained.