On Wed, 08 Jun 2011 21:58:17 +0800
TheSaint <nob...@nowhere.net.no> wrote:

> Kushal Kumaran wrote:
> 
> > os.geteuid
> 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.

Chris
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to