DragonFly BSD
DragonFly kernel List (threaded) for 2003-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Usernames > 16 characters


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Mon, 18 Aug 2003 13:11:37 -0700 (PDT)

    I will be committing the username/hostname/MAXLOGNAME changes tonight.

    I did a global search looking for instances where utmp, wtmp, and lastlog
    are accessed.  There are many programs, some of which are not under our
    control (i.e. contrib, or commonly installed externally or via ports),
    and I had to deal with a similar issue at BEST internet many years ago
    where we upgraded the system and utmp/wtmp got corrupted because some
    external programs still used the 'old' structure.

    Usernames are going from 16->32 bytes, terminal lines from 8->16 bytes,
    and recorded hostnames from 16->48 bytes (to accomodate full IPv6 names).
    I have also added a significant amount of slop to support 32/64 bit time
    storage and future additions.  I considered adding a magic number or
    version but it doesn't help the corruption problem so...

    I think the best solution to the corruption problem is to rename the utmp,
    wtmp, and lastlog files.  This way programs which are properly recompiled
    will use the correct file(s), and programs which are not updated won't
    be able to clobber them.

    These changes turn out to be very easy.  Just changing _PATH_* in
    utmp.h gets us 90% of the way there, and the rest of the changes are
    in manual pages, some minor rc.d stuff, and cron scripts.

    So, I am going to use the following file names:
	
	/var/run/utmp.d1
	/var/log/wtmp.d1
	/var/log/lastlog.d1

    Unless someone has a better idea, that is what they will be called.  I
    actually think it is a good idea to get away from the old (more hardwired)
    names because it forces programmers to consider these files more carefully
    then they normally do.  Perhaps we can get FreeBSD to adopt the scheme.

						-Matt




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]