[3033] in Athena Bugs

home help back first fref pref prev next nref lref last post

Re: 6.3B: su

daemon@ATHENA.MIT.EDU (Ken Raeburn)
Tue Aug 29 10:41:36 1989

Date: Tue, 29 Aug 89 10:41:18 -0400
From: Ken Raeburn <raeburn@ATHENA.MIT.EDU>
To: Richard Basch <probe@ATHENA.MIT.EDU>
Cc: bugs@ATHENA.MIT.EDU
In-Reply-To: Richard Basch's message of Tue, 29 Aug 89 06:33:55 -0400,
	   2) Any attempt at preserving the actual username
	      by doing this method is useless... a better way
	      would be to do a getlogin() call which reads the
	      entry from utmp.  Who's to say, I haven't su'd
	      twice.

Unless you're using an xterm without a utmp entry, or using script.
There *is* no good way to do this.

	   3) The behavior within the program is inconsistent
	      between root and other usernames.  Why should
	      "root" be special?  In fact, who's to say that
	      uid 0 is called root.  This is just one more
	      case of hard-coding.

I think "root" is also assumed as the default for "su", isn't it?

	   4) By removing the test, it becomes possible for
	      people to base their prompts on $user rather
	      than having to fork a "whoami" for every
	      invocation of .cshrc.  Currently, there is no
	      other sure way of insuring that the uid has
	      not changed except for doing this call.

Um, how about $uid?

home help back first fref pref prev next nref lref last post