[Pkg-sysvinit-devel] Bug#367428: sysvinit: last cut the username if its longer than eight characters

Petter Reinholdtsen pere at hungry.com
Thu Jul 27 12:40:42 UTC 2006


[Henrique de Moraes Holschuh]
> We have a problem here.  Debian is not POSIX, and in Debian
> usernames are already longer than 8 characters, plain and simple.

Well, you might find it plain and simple, but the fact is that there
are lots of programs and scripts unable to cope with usernames longer
than 8 characters.  The safe approach is thus to avoid them.

> Anything that expects them to be only 8-chars wide is already either
> broken, or very sub-optimal.

And they would be following the POSIX specification, even if you claim
they are broken.

Anyway, the interesting part of this discussion is what 'last' should
output when encountering a user with more than 8 characters in the
name.  This is the current output, indented 2 charcters:

  % last
  root     pts/7        some.host        Thu Jul 27 12:09 - 13:04  (00:55)
  user     pts/6        other.host       Wed Jul 26 17:42 - 19:53  (02:11)
  user     pts/0        other.host       Wed Jul 26 12:59 - 13:25  (00:25)
  user     pts/2        localhost        Tue Jul 25 16:33 - 16:33  (00:00)
  [...]
  %

At the moment the username is cut if it is longer than 8 characters.
There are a few options:

 - Should the column in the row with a long username be skewed
   compared to the other columns?

 - Should we come up with a different arbitrary size limit while still
   making sure the line is less than 80 characters long?  I believe it
   is important to keep the lines shorter than 80 characters.

 - Should we skew the next column (or as many as it takes), to make
   room for the longer username, and leave the others aligned?

> IMHO, We document it in NEWS.Debian, and go right ahead. It would be
> different if we didn't have >>8 chars usernames, but we already do,
> and for a long while, now.

I'm not sure what you suggest to document, as it is unclear to me how
to best handle longer usernames.  How do other unixes handle them in
'last'?




More information about the Pkg-sysvinit-devel mailing list