On Thu, May 20, 2010 at 6:01 PM, Darren J Moffat <[email protected]> wrote: > > Template Version: @(#)sac_nextcase 1.70 03/30/10 SMI > This information is Copyright (c) 2010, Oracle and/or its affiliates. All > rights reserved. > 1. Introduction > 1.1. Project/Component Working Name: > Username legnth > 1.2. Name of Document Author/Supplier: > Author: Darren Moffat > 1.3 Date of This Document: > 20 May, 2010 > 4. Technical Description > > Solaris currently documents a maximum username length of 8 characters > in passwd(4).
Erm... AFAIK this should be _bytes_, not characters. Characters would be multibyte characters in this context with the small twist that tools like Solaris's tools like "useradd" always restricted this to the ASCII character set while many sites allow (by using their own set of tools) non-ASCII usernames (e.g. German umlauts are commonly used on German university sites and some japanese customers have been using Japanese characters for some time) and other operating systems even allow a larger set of multibyte characters to be used. IMO this case should either allow the use of multibyte characters or expcitly refer to bytes/ASCII characters (see below). > Other Operating Systems don't have such a small limit. In fact Solaris > mostly works and has for quite some time with usernames upto 32 > characters. s/character/byte/. > The 8 character limit is manifest in three places > 1) the LOGNAME_MAX constant in <limits.h> (8) > 2) L_cuserid in stdio.h (when __EXTENSIONS__) is defined (9) > This symbol is deprecated for XPG6 / SUSv3 onwards. > 3) getconf _POSIX_LOGIN_NAME_MAX / LOGIN_NAME_MAX (9) > > The OpenGroup limits.h documentation says that LOGIN_NAME_MAX returns > the number maximum number length of a login name and that > _POSIX_LOGIN_NAME_MAX > is the minumum acceptable value. That implies that they need not be > the same. > > This case changes so that we have: > 1) the LOGNAME_MAX constant in <limits.h> (32) > 2) L_cuserid in stdio.h (when __EXTENSIONS__) is defined (33) > This symbol is deprecated for XPG6 / SUSv3 onwards. > 3) getconf _POSIX_LOGIN_NAME_MAX (9) > 4) getconf LOGIN_NAME_MAX (33) > > Going beyond 32 characters for the username is more complex since > utmpx(4) is defined to have the ut_user/ut_name field as 32 characters, > changing this would very likely break consumers of getutexent(3C) even > if they were all able to be recompiled. > > This case proposes to change the documented limit in passwd(4) from 8 > to 32 and declare that anything not implementing that is a bug. This > case does not require that any part of the system enforce 32 as an > upper limit (though some may), only that it is a bug that providing > it doesn't break standards if they enforce the legacy behaviour of 8 > and that they accept and use 32 character long usernames. "Work" does > not require that all output fields that "line up" with 8 character long > usernames still "line up" when using 32 character long usernames. I would give this case (if I could) a +1 with two minor changes: 1. "useradd" should clamp the string to 32bytes but _validate_ that the input username doesn't get any multibyte characters cut-off in the middle. 2. "useradd" should print a warning if non-ASCII characters (e.g. umlauts in ISO 8859-1/15) or multibyte characters are used unless a specific option is provided (e.g. -W) This is easy to do... if you don't have time I can volunteer to do this modification. ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) [email protected] \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;) _______________________________________________ opensolaris-arc mailing list [email protected]
