From owner-freebsd-arch@FreeBSD.ORG Wed Apr 9 22:46:18 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 55AB437B401; Wed, 9 Apr 2003 22:46:18 -0700 (PDT) Received: from possum.cryptohill.net (cambist.cryptohill.net [24.244.145.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id B68FE43F93; Wed, 9 Apr 2003 22:46:17 -0700 (PDT) (envelope-from jeroen@vangelderen.org) Received: from vangelderen.org (catv7146.extern.kun.nl [131.174.117.146]) by possum.cryptohill.net (Postfix) with ESMTP id ABDC8AE2A6; Thu, 10 Apr 2003 01:46:15 -0400 (EDT) Date: Thu, 10 Apr 2003 07:46:18 +0200 Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v551) To: "Jacques A. Vidrine" From: "Jeroen C. van Gelderen" In-Reply-To: <20030409122620.GC19391@madman.celabo.org> Message-Id: Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.551) cc: arch@freebsd.org cc: Poul-Henning Kamp 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: Thu, 10 Apr 2003 05:46:18 -0000 On Wednesday, Apr 9, 2003, at 14:26 Europe/Amsterdam, Jacques A. Vidrine wrote: > 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? Anybody know how NetBSD handles this? -J -- Jeroen C. van Gelderen - jeroen@vangelderen.org War prosperity is like the prosperity that an earthquake or a plague brings. The earthquake means good business for construction workers, and cholera improves the business of physicians, pharmacists, and undertakers; but no one has for that reason yet sought to celebrate earthquakes and cholera as stimulators of the productive forces in the general interest. -- Ludwig von Mises