Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jun 2010 18:38:31 -0600
From:      Scott Long <scottl@samsco.org>
To:        d@delphij.net
Cc:        "delphij@freebsd.org" <delphij@freebsd.org>, "freebsd-stable@freebsd.org" <freebsd-stable@freebsd.org>, Sean Bruno <seanbru@yahoo-inc.com>
Subject:   Re: [Stable 7] CPIO breakage/
Message-ID:  <334BCBA6-2EAE-48CA-98BF-1DC82AEF1B8A@samsco.org>
In-Reply-To: <4C18195A.3020501@delphij.net>
References:  <1276639800.2462.80.camel@localhost.localdomain> <1276646707.2462.82.camel@localhost.localdomain> <4C18195A.3020501@delphij.net>

next in thread | previous in thread | raw e-mail | index | archive | help

On Jun 15, 2010, at 6:22 PM, Xin LI wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> On 2010/06/15 17:05, Sean Bruno wrote:
>> On Tue, 2010-06-15 at 17:10 -0500, Sean Bruno wrote:
>>> http://svn.freebsd.org/viewvc/base?limit_changes=0&view=revision&revision=208361
>>> 
>>> I'm not sure what's up with this update, but it hosed up the default
>>> behavior of cpio.
>>> 
>>> It appears now that -o won't do the same things that it used to:
>>> 
>>> + cd /
>>> + find -x .
>>> + egrep -v '^\.(/snap|/usr/sup|/boot/kernel/kernel
>>> \.[[:alpha:]_]+\.[[:digit:]]+|/boot/kernel/kernel
>>> \.old|/etc/start_if.*|/etc/ssh/ssh_host_.*key|/etc/hostid|/etc/(master.passwd|passwd|spwd.db|pwd.db))'
>>> + '[' -n '' ']'
>>> + '[' 7 = 4 ']'
>>> + '[' -n '' -a -z '' ']'
>>> + '[' -n /home/backup ']'
>>> + echo 'dumping / ...'
>>> dumping / ...
>>> + cpio -o --quiet --format crc -O /home/backup/root.amd64.cpio
>>> cpio: ./dev not dumped: minor number would be truncated
>>> cpio: Removing leading `/' from member names
>>> cpio: ./proc not dumped: minor number would be truncated
>>> cpio: Removing leading `../' from member names
>>> 
>>> We've had to revert this change from our local tree, suggestions?
>>> 
>>> Sean
>> 
>> 
>> A little more background.  It looks like symlinks are getting stripped
>> of their '/' which sucks.  Ideas?
>> 
>> Sean
>> 
>> e.g. /home/foo/bar -> /opt/baz/blob
>> 
>> becomes
>> 
>> home/foo/bar -> opt/baz/blob   
>> 
>> Yuck.
> 
> This is a security measurement I think.
> 
> - --absolute-filenames disables this behavior.

This is exactly the kind of stuff that was supposed to be avoided in stable branches.  Your import of cpio cost us several days of debugging.

Scott




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?334BCBA6-2EAE-48CA-98BF-1DC82AEF1B8A>