|| at Jun 8, 2011 at 8:08 pm
On Wed, 08 Jun 2011 21:58:17 +0800 TheSaint wrote:
Kushal Kumaran wrote:
This return 0 for *root* . I don't know if it's a standard for all
distro. Mine is Archlinux.
I'd just like to avoid error caused by wrong access by user
It is. Until Linux capabilities, EUID==0 used to be special-cased in the
kernel as being the test for binding to network ports <1024, bypassing
filesystem access control, changing the system time, and so on. Since
Linux caps, it's theoretically possible to use a different UID, but for
compatibility and convenience, as well as because PID 1 (/sbin/init) is
still invoked by the kernel as UID 0, everyone still does that.