[4810] in Athena Bugs
vax 6.4R: rcs, ci, co, rlog
daemon@ATHENA.MIT.EDU (drmorris@MIT.EDU)
Sun Apr 22 06:53:52 1990
From: drmorris@MIT.EDU
To: bugs@ATHENA.MIT.EDU
Date: Sun, 22 Apr 90 06:53:33 EDT
System name: beeblebrox
Type and version: CVAXSTAR 6.4R (1 update(s) to same version)
Display type: SM
What were you trying to do?
rcs -l, or ci a file when I was not in /etc/passwd
What's wrong:
rcs and ci dump core (co and rlog under appropriate circumstances)
What should have happened:
I should have gotten a warning/error that I was not in the passwd file.
The problem is not too hard to see. In rcsutil.c:
char * getcaller()
/* Function: gets the callers login from his uid.
* If the uid is root, tries to get the true login with getlogin().
*/
{ char * name;
int uid;
uid=getuid();
if (uid==0) {
/* super user; try getlogin() to distinguish */
name = getlogin();
if (name!=nil && *name!='\0')
return name;
}
return(getpwuid(uid)->pw_name);
}
When the uid is not in the passwd file, getcaller tries to
dereference a null pointer.
- Dave Morrison