I'd like to weigh in on a couple of things here:

1. POSIX does not appear to require that usernames be a maximum of 8
characters. The limits.h document linked to above says the login name
max constant must be at minimum 9 bytes (including the trailing NULL).
This would suggest that setting the username max length to 8 (plus NULL)
is the absolute minimum allowed by POSIX, rather than the upper limit we
could go.

2. The patch provided seems to work, but it completely borks output -
both for scripts and terminals 80 characters wide. It's all well and
good, in my opinion, to support longer usernames, but we shouldn't break
expected behaviour. Most Debian systems are more likely to have scripts
that expect 80 character line length from last than long usernames.

3. With this in mind, I adjusted the patch slightly. Now last uses the
old behaviour by default, but includes a new flag "-l" which allows for
displaying longer usernames than 8 characters. This way old scripts and
behaviour is preserved. If an admin knows they have users with 8+
character names they can run "last -l" to get the new behaviour.

The modified patch has been applied upstream and will appear in SysV
init 2.92.

- Jesse

Reply via email to