From owner-freebsd-arch@FreeBSD.ORG Wed Apr 9 05:26:25 2003 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 306C937B401 for ; Wed, 9 Apr 2003 05:26:25 -0700 (PDT) Received: from gw.nectar.cc (gw.nectar.cc [208.42.49.153]) by mx1.FreeBSD.org (Postfix) with ESMTP id 80F9C43FBD for ; Wed, 9 Apr 2003 05:26:24 -0700 (PDT) (envelope-from nectar@celabo.org) Received: from madman.celabo.org (madman.celabo.org [10.0.1.111]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (Client CN "madman.celabo.org", Issuer "celabo.org CA" (verified OK)) by gw.nectar.cc (Postfix) with ESMTP id 9BA54E; Wed, 9 Apr 2003 07:26:21 -0500 (CDT) Received: by madman.celabo.org (Postfix, from userid 1001) id E439378C43; Wed, 9 Apr 2003 07:26:20 -0500 (CDT) Date: Wed, 9 Apr 2003 07:26:20 -0500 From: "Jacques A. Vidrine" To: Poul-Henning Kamp Message-ID: <20030409122620.GC19391@madman.celabo.org> References: <31398.1049876261@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <31398.1049876261@critter.freebsd.dk> X-Url: http://www.celabo.org/ User-Agent: Mutt/1.5.3i-ja.1 cc: arch@freebsd.org Subject: Re: endianess of /etc/pwd.db X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2003 12:26:25 -0000 On Wed, Apr 09, 2003 at 10:17:41AM +0200, Poul-Henning Kamp wrote: > > Kris ran into this problem: copying a /etc/pwd.db from one endianess > to another gave him really weird uid/gid numbers. > > The DB code itself is endianess-agnostic, so the first warning one > gets is the weird UID/GID. > > Should we make the endianess of this file explicit to prevent this > pit-fall for our users ? The cost would be less than epsilon. I am working in this area recently, and the exact same thought occurred to me. I think we should do it. I would add a file format version flag, the absence of which indicates the current MD format, and adjust getpwent/pwd_mkdb accordingly. Are there any other tools that would need to be touched? Cheers, -- Jacques A. Vidrine http://www.celabo.org/ NTT/Verio SME . FreeBSD UNIX . Heimdal Kerberos jvidrine@verio.net . nectar@FreeBSD.org . nectar@kth.se