[net.bugs.4bsd] sendmail turns _ in login names into a space

geoff@utcs.uucp (Geoff Collyer) (11/08/85)

Index:	usr.lib/sendmail/src/recipient.c 4.2BSD

Description:
	We have login names for our uucp neighbours of the form u_host
	(e.g. u_utzoo).  sendmail thinks underscores should be turned
	into spaces before looking up login names in the password file
	and consequently never found such login names.  We had dueling
	sendmails when one machine's uux (running under a u_host login
	name) mailed an error message to another machine's u_host login.
Repeat-By:
	Create a u_ucbvax login.  Try to send mail to it.
	Watch sendmail say "u_ucbvax ... User unknown".
Fix:
	This fix makes sendmail leave underscores alone.  (Eric, get away
	from that airplane glue!)

*** /tmp/,RCSt1022658	Fri Nov  8 04:27:24 1985
--- /tmp/,RCSt2022658	Fri Nov  8 04:27:28 1985
***************
*** 344,350
  
  	for (p = name; *p != '\0'; p++)
  	{
! 		if (*p == (SpaceSub & 0177) || *p == '_')
  			*p = ' ';
  	}
  

--- 344,354 -----
  
  	for (p = name; *p != '\0'; p++)
  	{
! 		if (*p == (SpaceSub & 0177)
! #ifdef notdef
! 		    || *p == '_'
! #endif
! 		    )
  			*p = ' ';
  	}

-- 
"Throw out the hardware, let's do it right." - S. Dan

guy@sun.uucp (Guy Harris) (11/11/85)

> Description:
> 	We have login names for our uucp neighbours of the form u_host
> 	(e.g. u_utzoo).  sendmail thinks underscores should be turned
> 	into spaces before looking up login names in the password file
> 	and consequently never found such login names.
> ...
> Fix:
> 	This fix makes sendmail leave underscores alone.  (Eric, get away
> 	from that airplane glue!)

"And 6000 tubes of airplane glue!"  -- L. Bruce (6000 may not be the exact
number)

The 4.2BSD (and, I think, V7 and possibly S3, but definitely not S5) "login"
turned *spaces* in the logname into *underscores*, but why the hell
"sendmail" should turn them *back* escapes me.  No need even to protect that
crock with "#ifdef notdef" - it's just plain *wrong*.

	Guy Harris

"Don't want to do it without the fez on" - S. Dan