Bug 226609

Summary: Expand ut_user from 32 characters to 64 to support longer usernames
Product: Base System Reporter: Dan Wood <dwood>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Some People CC: brooks
Priority: --- Keywords: patch
Version: CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
svn diff for changed kernel files none

Description Dan Wood 2018-03-14 16:27:58 UTC
Created attachment 191499 [details]
svn diff for changed kernel files

We use longer usernames for FTP/SSH logins within our webhosting cluster and have manually been patching this to the kernel source tree for several years now. It has not caused any instability even under heavy concurrent connections.

The attached diffs double the size of ut_user (include/utmpx.h) and MAXLOGNAME (sys/sys/param.h)
Comment 1 Brooks Davis freebsd_committer 2018-03-14 16:56:19 UTC
The layout of struct utmpx is part of the libc ABI and the format of files stored on disk so this can't just be changed.  The effort required to make this change properly would be substantial.  At a minimum, libc compatibility shims would be required with new symbol versions and a mechanism to handle there change in the format of /var/run/utx.active, /var/log/utx.lastlogin, and /var/log/utx.log.  See getutxent(3) for one set of effected interfaces.  A number of syscalls use MAXLOGNAME and might need to be altered as well.