Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site unmvax.UUCP Path: utzoo!watmath!clyde!floyd!cmcl2!lanl-a!unm-cvax!unmvax!lee From: lee@unmvax.UUCP Newsgroups: net.bugs.4bsd Subject: 4.2 Mail bug fix Message-ID: <211@unmvax.UUCP> Date: Sun, 19-Feb-84 22:12:16 EST Article-I.D.: unmvax.211 Posted: Sun Feb 19 22:12:16 1984 Date-Received: Tue, 21-Feb-84 08:19:23 EST Organization: Univ. of New Mexico, Albuquerque Lines: 97 If a user has parends in the gecos field in /etc/passwd the Mail interface tacks a parend onto the end of his name. This makes 'r' or 'R' annoying. Repeat by: Log in as a user who has an open/close parend pair in his gecos field (or make one or whatever...) and send mail to yourself. When you enter mail you will notice something like.. unmvax 2.1 "/usr/spool/mail/lee": 4 messages > 1 genix!ldl Sun Nov 20 00:02 15/266 2 parsec!kolstad Thu Sep 15 23:29 37/1251 "Re: UUCP connect" 3 lee Sun Sep 4 22:27 14/275 "bad INTEL board" 4 stanly) Sun Feb 19 16:33 12/302 "Re: REDUCE" & To fix: cd to /usr/src/ucb/Mail and edit aux.c The following is a diff -c to show what needs changed. *** aux.original Sun Feb 19 19:58:57 1984 --- aux.c Sun Feb 19 20:02:31 1984 *************** *** 1,5 /* ! * $Header: aux.c,v 1.1 84/02/19 19:58:53 root Exp $ * $Log: aux.c,v $ * Revision 1.1 84/02/19 19:58:53 root * Initial revision --- 1,5 ----- /* ! * $Header: aux.c,v 1.2 84/02/19 20:02:02 root Exp $ * $Log: aux.c,v $ * Revision 1.2 84/02/19 20:02:02 root * Fixed the parends at the end of the name problem. *************** *** 1,6 /* * $Header: aux.c,v 1.1 84/02/19 19:58:53 root Exp $ * $Log: aux.c,v $ * Revision 1.1 84/02/19 19:58:53 root * Initial revision * --- 1,10 ----- /* * $Header: aux.c,v 1.2 84/02/19 20:02:02 root Exp $ * $Log: aux.c,v $ + * Revision 1.2 84/02/19 20:02:02 root + * Fixed the parends at the end of the name problem. + * --Lee + * * Revision 1.1 84/02/19 19:58:53 root * Initial revision * *************** *** 565,572 for (cp = name, cp2 = nbuf; c = *cp++; ) { switch (c) { case '(': ! while (*cp != ')' && *cp != 0) ! cp++; if (*cp) cp++; lastsp = 0; --- 569,592 ----- for (cp = name, cp2 = nbuf; c = *cp++; ) { switch (c) { case '(': ! /* If a user has parends in the GECOS field this ! * used to get TOTALLY messed. We just keep track ! * of how many open parends we see and keep going ! * until count is zero rather than quit at the ! * first close parend. ! * --Lee 84/02/19 ! */ ! { ! int pcount = 1; ! ! while (*cp != 0 && pcount > 0) { ! if (*cp == '(') ! ++pcount; ! else if (*cp == ')') ! --pcount; ! ++cp; ! } ! } if (*cp) cp++; lastsp = 0; --Lee (Ward) {ucbvax,parsec,gatech}!unmvax!lee