Acbosgd.179
net.general
utzoo!decvax!ucbvax!ihnss!cbosg!cbosgd!mark
Sat Dec  5 20:30:19 1981
Re: query about long unames
There are a number of UNIX programs that have the magic numbers 6, 7, 8, 9,
and 10 embedded in them.  For example, they appear in ls, who, /etc/utmp,
uucp, and sccs.  In most cases, it is sufficient to find all of them and
fix the numbers.  They can be found in array decls, checks of the last
character (like the 8th one in utmp, since then it isn't null terminated),
and even in printf formats (there is a %-6.6s in the ls command in v7!)

Before 4BSD, I made extensive use of the grep command and went around
changing things to use the sizeof function wherever possible.  This
introduced several remote formats.  The intent was to upgrade to 14
character user names (sorry, but to me "uname" means the name of the
system, not the login) at Berkeley.  However, this never happened, and
so the changes made were never tested for any case other than 8.

In almost all cases, changing the sizes and recompiling will solve the
problem.  The one exception is UUCP.  The problem is that UUCP sends
across the link, the name of the user who requested the action, for
logging purposes and so that mail can be returned if it fails.  This
name is kept in a 10 byte buffer.  So if sites A and B have a UUCP link,
and A has long names, if one of these long named people sends mail to B,
it can overflow the buffer on B (which does not check) and wedge the
connection until the message is removed manually.  Presumably a site that
has long names should truncate the name to 7 letters before sending it
across.  Note that the higher level mail software does not care about how
long your mailing address is, so there is no need to truncate mailing
addresses at the user visible level.

-----------------------------------------------------------------
gopher://quux.org/ conversion by John Goerzen <[email protected]>
of http://communication.ucsd.edu/A-News/


This Usenet Oldnews Archive
article may be copied and distributed freely, provided:

1. There is no money collected for the text(s) of the articles.

2. The following notice remains appended to each copy:

The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996
Bruce Jones, Henry Spencer, David Wiseman.