Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!paperboy!think.com!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!alberta!atha!aupair.cs.athabascau.ca!lyndon From: lyndon@cs.athabascau.ca (Lyndon Nerenberg) Newsgroups: comp.unix.questions Subject: Re: long userids Message-ID: <612@aupair.cs.athabascau.ca> Date: 17 Jan 91 22:25:21 GMT References: <70DsV1w163w@wvus.wciu.edu> Organization: Athabasca University Lines: 26 >| Are there any deadly implications to using long (>8 chars) userid names >| in /etc/passwd? Yes. A lot of Unix implementations have the following line in : #define L_cuserid 9 This constant defines the size of a char array large enough to hold a login name plus the terminating NULL. Some (not a lot, but some) software uses this constant to size buffers. If the code doesn't check for (strlen(pw->pw_name) < L_cuserid) you're going to have problems. Not all Unix releases document this constant. Under SunOS it's mentioned in the cuserid(3) man page. I would strongly advise that you limit login names to a maximum of eight characters. There are better ways to achieve what you're setting out to do than by overloading the semantics of login names. -- Lyndon Nerenberg VE6BBM / Computing Services / Athabasca University {alberta,cbmvax,mips}!atha!lyndon || lyndon@cs.athabascau.ca Packet: ve6bbm@ve6mc [.ab.can.na] The only thing open about OSF is their mouth. --Chuck Musciano