NetBSD Problem Report #42026

From  Tue Sep  8 20:39:13 2009
Return-Path: <>
Received: from ( [])
	by (Postfix) with ESMTP id 6393A63BC1D
	for <>; Tue,  8 Sep 2009 20:39:13 +0000 (UTC)
Message-Id: <>
Date: Tue,  8 Sep 2009 20:39:00 +0000 (UTC)
Subject: "mtree -C" should not map user/group names to/from numbers
X-Send-Pr-Version: 3.95

>Number:         42026
>Category:       toolchain
>Synopsis:       "mtree -C" should not map user/group names to/from numbers
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 08 20:40:03 +0000 2009
>Last-Modified:  Mon Mar 12 00:33:55 +0000 2018
>Originator:     Alan Barrett
>Release:        NetBSD 5.99.16
Not much
System: NetBSD 5.99.16 i386
	"mtree -C" tries to map user and group names to numeric values on
	input, and map them back to names on output.  It should
	simply preserve the input values unchanged.

	$ mtree -C -K all <<EOF
	. type=dir uid=0 gid=0
	. type=dir uname=root gname=wheel

	See how the numeric values have been translated to names.  That
	should not happen.

	During a cross-build on an OS X 10.6 system, the METALOG ends
	up with this line:

	./var/db/postfix type=dir uid=12 gname=everyone mode=0755

	instead of the expected

	./var/db/postfix type=dir uname=postfix gname=postfix mode=0755

        Note that user "postfix" is uid 12 on NetBSD, but there is
        no user with uid 12 on the OS X build host; group "postfix"
        is gid 12 on NetBSD, but group "everyone" is gid 12 on the
        OS X build host.  It appears that the uid_from_user() and
        gid_from_group() invocations on the input side are using a
        NetBSD group and passwd database as is appropriate in a cross
        build (and translating the input names to numeric value 12),
        but the user_from_uid() and group_from_gid() invocations on the
        output side are incorrectly using native OS X group and passwd

	Augment the internal data structures to keep track of whether
	input was a name or a number, and use that information on



Responsible-Changed-From-To: bin-bug-people->apb
Responsible-Changed-When: Thu, 10 Sep 2009 07:38:13 +0000
I'll work on this

Responsible-Changed-From-To: apb->toolchain-manager
Responsible-Changed-When: Mon, 12 Mar 2018 00:33:55 +0000
Reset responsible field for retired developer.


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.