[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reflection and /proc



Scott Lurndal writes:

> It appears that linux is subtley different in the way that
> login works.  In SVR4 derived systems such as Irix, or Unixware, 
>
> $ ls -lL /usr/bin/login
> -rwsr-xr-x    1 root     sys        65848 May 22  1998 /usr/bin/login
>
> It is /usr/bin/login (or more specifically, /usr/lib/iaf/scheme) which
> handles the login process starting at reading and validating the password
> through executing the login shell.   At some point in this process, 
> login must change it's uid to that of the new user; thus it is setuid.
...
> So, it would appear that linux login just invokes su, whereas other 
> unices login perform equivalent functionality as setuid applications. 

Huh? The login program runs as root because the parent runs as root.
It does not exec the su program.

> Where shall we start?   ptrace() was designed to work with a single
> parent-child relationship, while /proc was designed to allow multiple
> processes and/or threads to be controlled by a single debugger; without
> imposing relationship constraints on the debugger (note the crufty stuff
> to reparent a process temporarily in linux to support the ptrace extensions).

Process reparenting is not needed. Linus wants to remove it.
-
Linux-future: thinking about the future of the Linux kernel
Archive:      http://humbolt.nl.linux.org/lists/
Wish list:    http://users.ox.ac.uk/~mert0236/linux-future.html