Subject: long usernames
To: None <firstname.lastname@example.org>
From: David Laight <email@example.com>
Date: 02/13/2003 12:05:54
Since sysctl kern.login_name_max = 17 you would expect to be able
to have usenames that are 16 chars long.
However the longest one that works is actually 14!
Attempting to use longer names fails at login time:
login: setlogin(usersixteenchars) failure: Invalid argument
login: setlogin(userfifteenchar) failure: Invalid argument
The 'problem' seems to be twofold:
1) sys___setlogin() calls copyinstr( , , sizeof(s->s_login) - 1, )
2) sizeof(s->s_login) is 16, so this has to be able to handle a name
that is missing the final null. Nothing allows for that.
Should this be fixed?
David Laight: firstname.lastname@example.org