deceptive mail

Henry Spencer henry at utzoo.UUCP
Wed Nov 21 05:00:27 AEST 1984


> > This should not be a staggering surprise; the login operation is not
> > recursive, and trying to use it that way is obviously a disaster in the
> > making.  The correct approach to this particular problem is to fix login
> > to recognize, and reject, attempts at recursive logins.
> 
> Well, perhaps. I do not see the possibility of a recursive login as
> something that is broken and should be fixed, in fact I use it almost daily.
> 
> My only point was to warn you that the value returned by getlogin() is
> not always reliable.

Well, you pays your money and you takes your choice.  Either you say that:

	(a) the value from getlogin() isn't reliable
	(b) the environment on login can be a strange mishmash of the
		user's environment and the previous user's environment
	(c) the stty settings ditto

or
	(d) the login operation is not recursive, and hence leads to
		confusion if you try to use it that way.

It sure sounds to me like (d) is the simpler explanation of the phenomena.
The fact is, login is modifying "global variables" like the utmp entry,
the environment, and the stty settings, and they don't get put back later.
This is practically the *definition* of something that isn't recursive.
Oh, sure, you can use it that way... provided you aren't too fussy about
the results.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,linus,decvax}!utzoo!henry



More information about the Comp.unix.wizards mailing list