Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!limbo!taylor From: taylor@limbo.Intuitive.Com (Dave Taylor) Newsgroups: comp.mail.elm Subject: Re: Elm and & in GCOS field of passwd file Message-ID: <1332@limbo.Intuitive.Com> Date: 12 Oct 90 20:09:02 GMT References: <1284@n_kulcscs.kuleuven.ac.be> Reply-To: taylor@limbo.Intuitive.Com (Dave Taylor) Organization: Intuitive Systems, Mountain View, CA: +1 (415) 966-1151 Lines: 44 > Elm interprets an '&' in the GCOS field of an entry in the password file > as the corresponding user name _in upper case_. Interesting behaviour... in the original code (initialize.c): if (pass->pw_gecos[i] == '&') { full_username[j] = '\0'; strcat(full_username, expand_logname()); j = strlen(full_username); } and further down in the code... char *expand_logname() { /** Return logname in a nice format (for expanding "&" in the /etc/passwd file) **/ static char buffer[SLEN]; register int i; if (strlen(username) == 0) buffer[0] = '\0'; else { buffer[0] = toupper(username[0]); for (i=1; username[i] != '\0'; i++) buffer[i] = tolower(username[i]); buffer[i] = '\0'; } return( (char *) buffer); } It *used* to do what you're asking for... From the peanut gallery, -- Dave Taylor Intuitive Systems Mountain View, California taylor@limbo.intuitive.com or {uunet!}{decwrl,apple}!limbo!taylor