[6942] in Athena Bugs
mh
daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Wed Jan 23 17:37:44 1991
To: bugs@ATHENA.MIT.EDU
Date: Wed, 23 Jan 91 17:37:29 EST
From: John Carr <jfc@ATHENA.MIT.EDU>
System is PS/2, but it shouldn't matter.
$ env | grep USER
USER=jfctest
$ klist | head -2
Ticket file: /tmp/tkt_jfctest
Principal: jfctest@ATHENA.MIT.EDU
$ msgchk
msgchk: -ERR Wrong username supplied (jfctest vs. jfc)
msgchk and some other mh programs call getpwuid(getuid()) to get a passwd
struct which they use to find the username and home directory of the user.
I understand that the authors of mh tried hard to make things work in
unexpected ways; this is an simple example of a complete success. Most
programs use the "USER" and "HOME" environment variables to find the
username and home directory, and users can normally expect resetting these
variables to change their environment.
There are other similar failures, which I've been complaining about since
fall 1987. Two that I remember:
1. with tickets as another user, mh still tries to get your mail
(I realize now that this is hard to fix and may even be considered
correct behavior, but I don't remember getting a response to my
bug report)
2. inc -user foo, when run by user bar, checks mail for foo on bar's
pobox. See changes.72 note 26.
A good start on a fix would be to run
rm -rf /source/athena/new/mh*
vos release source.athena -cell rel-eng.athena.mit.edu
and have a few programmers work a week or two to rewrite the useful parts
of mh.