Subject: bin/35570: etcupdate(8) runs mtree on outdated passwd/group information
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: Hauke Fath <hf@spg.tu-darmstadt.de>
List: netbsd-bugs
Date: 02/08/2007 15:25:00
>Number: 35570
>Category: bin
>Synopsis: etcupdate(8) runs mtree on outdated passwd/group information
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Feb 08 15:25:00 +0000 2007
>Originator: Hauke Fath <hf@spg.tu-darmstadt.de>
>Release: NetBSD 4.0_BETA2
>Organization:
>Environment:
System: NetBSD Gurgler 4.0_BETA2 NetBSD 4.0_BETA2 (GURGLER-$Revision: 1.8 $) #0: Wed Feb 7 17:48:48 CET 2007 hf@Hochstuhl:/var/obj/netbsd-builds/4/sparc/sys/arch/sparc/compile/GURGLER sparc
Architecture: sparc
Machine: sparc
>Description:
When it adds new users and groups to /etc/{group,passwd}, etcupdate(8)
runs mtree on outdated passwd/group information:
[...]
*** The following files need your attention:
/tmp/temproot/etc/csh.cshrc
/tmp/temproot/etc/csh.login
/tmp/temproot/etc/csh.logout
/tmp/temproot/etc/hosts
/tmp/temproot/etc/motd
/tmp/temproot/etc/profile
/tmp/temproot/etc/X11/xdm/Xresources
/tmp/temproot/etc/X11/xdm/Xsession
/tmp/temproot/root/.cshrc
/tmp/temproot/var/cron/tabs/root
/tmp/temproot/.cshrc
Remove /tmp/temproot? (y/[n]) y
*** Removing /tmp/temproot
You have created new directories. Run mtree to set permissions? (y/[n]) y
mtree: unknown user `_rwhod'
mtree: failed at line 1103 of the specification
Do you want to rebuild the device nodes in /dev? (y/[n]) y
Running MAKEDEV in /dev
Do you want to rebuild the mail alias database? (y/[n]) y
Running newaliases
Do you want to rebuild the password databases from the new master.passwd? (y/[n]) y
Running pwd_mkdb
*** All done
[hf@Gurgler] /home/hf #
When there are new users and groups added by etcupdate(8), it
should update the passwd and group databases _before_ running
mtree on the filesystem.
>How-To-Repeat:
Upgrade a NetBSD installation, then run etcupdate(8).
Watch mtree fail because of "unknown users or groups".
This problem has been around for a long time.
>Fix:
Have etcupdate(8) update the /etc/*.db databases before it
runs mtree - preferably in time for the NetBSD 4 release.
>Unformatted: