Usernames > 16 characters

Matthew Dillon dillon at apollo.backplane.com
Mon Aug 18 15:19:43 PDT 2003


:Is that 32 bytes which includes the terminating null character
:(where there is a terminating null character), or 32 characters
:without counting the terminating null?  I have no preference,
:it's just a detail which is nice to state explicitly, in case
:different people make different assumptions.
:
:(same question for 16 and 48 byte limits...)
:
:-- 
:Garance Alistair Drosehn            =   gad at xxxxxxxxxxxxxxxxxxxx

    Well, that goes to the historical nature of utmp/wtmp/lastlog.  These
    structural files traditionally allowed names to be as long as the actual
    buffer (i.e. not have a terminating \0 byte), and many programs which  
    write into them are likely to do so.

    My preference is to always require a terminating \0 (making the limit one
    less then the macro says), but I recognize the reality of the situation
    which is that all code that accesses these structures had better be
    able to handle a non-terminated full-length name in the buffer.

						-Matt






More information about the Kernel mailing list