NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/42031: mtree(8) -M (merge) option broken

>Number:         42031
>Category:       bin
>Synopsis:       mtree(8) merge option broken with spec.c:1.69
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 10 01:35:01 +0000 2009
>Originator:     Geoff C. Wing
>Release:        NetBSD 5.99.16
System: NetBSD 5.99.16 NetBSD 5.99.16 (G) #0: Tue Sep 8 
12:06:20 EST 2009 i386
Architecture: i386
Machine: i386
        mtree no longer has a working merge option (which is used by
        /etc/security to allow local mtree variations).  Both new and
        old nodes are spewed out.  It broke with this change:
revision 1.69
date: 2009/04/03 21:18:59;  author: apb;  state: Exp;  lines: +98 -33
Make "mtree -C" sort its output.

As the input is read from a specfile into a tree of linked lists,
keep each linked list sorted.  The sort order is the same as that
already used by "mtree -c": directories sort after non-directories, but
otherwise names are sorted in the order used by strcmp().

% cat <<EOF >/tmp/foo
.                               type=dir
./etc                           type=dir
./etc/namedb                    type=dir  mode=0755
./etc/namedb                    type=link  mode=0755
% mtree -CM -k all < /tmp/foo | grep ./etc/namedb
./etc/namedb type=dir uname=root gname=wheel mode=0755 
./etc/namedb type=link uname=root gname=wheel mode=0755 
% working-mtree -CM -k all < /tmp/foo | grep ./etc/namedb
./etc/namedb type=link uname=root gname=wheel mode=0755 


Home | Main Index | Thread Index | Old Index