*BSD News Article 81162


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!hunter.premier.net!news.mathworks.com!fu-berlin.de!irz401!orion.sax.de!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Differences in wtmp file format between FBSD and BSDI
Date: 20 Oct 1996 14:35:31 GMT
Organization: Private BSD site, Dresden
Lines: 56
Message-ID: <54ddbj$3gs@uriah.heep.sax.de>
References: <53rl7h$jpo@nntp.igs.net> <543n36$p67@newsbr.eunet.fr>
  <547lk2$830@innocence.interface-business.de> <549mfp$6fi@news.pcslink.com>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.6
X-Phone: +49-351-2012 669
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F  93 21 E0 7D F9 12 D6 4E

ryan@pcslink.com (Ryan Mooney) wrote:

> BSDI has 
>  #define UT_NAMESIZE     16
> 
> Has anyone done this for FreeBSD?   Is it planned?  I have a couple BSDI 

No, there's still some opposition against it -- for just the reason of
this incompatibility.

> boxes that I'd like to move to FreeBSD (older BSDI version, don't want to
> pay to upgrade),  but a lot of the users have > 8 character user names...

Simply install the system (with sources -- they don't cost you
anything else than the disk space :), change the constant in this
header file, recompile and reboot your kernel, then ``cd /usr/src;
make world''.

If you do this before you release the machine to the users, everything
should work fine.  Don't forget to remove your old /var/log/wtmp file
before rebooting.

> This could be a problem (I really don't want to re-compile everything
> that depends on utmp.h, and then find some hard coded strncpy(bar, foo, 8)
> That makes my life miserable...  I would also rather not tell the users that 

I think i've read reports that people have increased it and are
running this way.  I'm not sure whether anybody has used 16 characters
yet.

Well, perhaps i should do it on my machine, write the tool to convert
the old wtmp files into the new format (i'm not leaned towards using
my lastlog), and shake it out...

<sys/param.h> contains the following:

 *
 * MAXCOMLEN should be >= sizeof(ac_comm) (see <acct.h>)
 * MAXLOGNAME should be >= UT_NAMESIZE (see <utmp.h>)
 */
#include <sys/syslimits.h>

#define MAXCOMLEN       16              /* max command name remembered */
#define MAXINTERP       32              /* max interpreter file name length */
#define MAXLOGNAME      12              /* max login name length */

So i would anticipate more backwards compatibility breakage when
bumping MAXLOGNAME, too.  (The session and user struct's change their
size.)

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)