endianess of /etc/pwd.db
Jacques A. Vidrine
nectar at FreeBSD.org
Wed Apr 9 05:26:25 PDT 2003
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 <nectar at celabo.org> http://www.celabo.org/
NTT/Verio SME . FreeBSD UNIX . Heimdal Kerberos
jvidrine at verio.net . nectar at FreeBSD.org . nectar at kth.se
More information about the freebsd-arch
mailing list