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

Re: Chown ???



Alan Cox wrote:
I was at BTL in the very early '80s.  Writing kernel mods and drivers
for Unix, and teaching Unix internals to BTL employees.  It's always been
"superuser".  I don't know where anyone got this lame "substitute user"
stuff, but it's not authentic.

To quote the V7 manual page

-su  \-  substitute user id temporarily


So although a lot of people believe su is superuser, they are wrong.
Alan

from UNIX V6[1]

$ cat su.c
/* su -- become super-user */

char    password[100];
char    pwbuf[100];
int     ttybuf[3];
main()
{
	register char *p, *q;
	extern fin;

	if(getpw(0, pwbuf))
		goto badpw;
	(&fin)[1] = 0;
	p = pwbuf;
	while(*p != ':')
		if(*p++ == '\0')
			goto badpw;
	if(*++p == ':')
		goto ok;





[1]http://www.roesler-ac.de/wolfram/acro/credits.htm#2


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