[2051] in Athena Bugs
(VS2) Version 6.1C: /usr/athena/ksu, /bin/su
daemon@ATHENA.MIT.EDU (Ilhamuddin Ahmed)
Thu Apr 6 14:15:00 1989
Date: Thu, 6 Apr 89 14:14:40 EDT
From: Ilhamuddin Ahmed <ilham@ATHENA.MIT.EDU>
To: jtkohl@ATHENA.MIT.EDU
Cc: bugs@ATHENA.MIT.EDU
In-Reply-To: John T Kohl's message of Thu, 6 Apr 89 13:13:57 EDT <8904061713.AA12702@LYCUS.MIT.EDU>
Reply-To: ilham@ATHENA.MIT.EDU
John> Date: Thu, 6 Apr 89 13:13:57 EDT
John> From: John T Kohl <jtkohl@ATHENA.MIT.EDU>
John> X-Us-Snail: MIT Room E40-351, 1 Amherst St., Cambridge, MA 02139 USA
John> This is still NOT an excuse for SU to report the wrong username to the
John> logs. It is important for system admins to be able to trust that the
John> correct name is reported to the log file.
Simple change - attached.
- Ilham
===============================================================================
*** /minos/source/4.3/bin/su.c Thu Mar 10 16:30:13 1988
--- su.c Thu Apr 6 14:09:18 1989
***************
*** 229,234 ****
--- 229,237 ----
if ((name = getlogin()) != NULL)
if (*name != NULL)
return(name);
+
+ if ((pw = getpwuid(getuid())) != NULL)
+ return (pw->pw_name);
if (isatty(2)) {
if (fstat(2, &statbuf) != 0)
return(noname);
***************
*** 236,244 ****
return(noname);
return(pw->pw_name);
}
! if ((pw = getpwuid(getuid())) == NULL)
! return(noname);
! return(pw->pw_name);
}
move_pwd(s, t)
--- 239,245 ----
return(noname);
return(pw->pw_name);
}
! return(noname);
}
move_pwd(s, t)