From wb@arb-phys.uni-dortmund.de  Tue Jan 10 07:28:45 1995
Received: from gisli.arb-phys.uni-dortmund.de (Sgisli.arb-phys.uni-dortmund.de [192.109.44.250]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id HAA13870 for <FreeBSD-gnats-submit@freebsd.org>; Tue, 10 Jan 1995 07:28:40 -0800
Received: (from wb@localhost) by gisli.arb-phys.uni-dortmund.de (8.6.9/8.6.9) id RAA11625; Tue, 10 Jan 1995 17:35:28 +0100
Message-Id: <199501101635.RAA11625@gisli.arb-phys.uni-dortmund.de>
Date: Tue, 10 Jan 1995 17:35:28 +0100
From: "Wilhelm B. Kloke" <wb@arb-phys.uni-dortmund.de>
Reply-To: wb@arb-phys.uni-dortmund.de
To: FreeBSD-gnats-submit@freebsd.org
Subject: pax -rwl may corrupt filesystem
X-Send-Pr-Version: 3.2

>Number:         104
>Category:       bin
>Synopsis:       pax -rwl may corrupt filesystem
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 10 07:30:00 1995
>Closed-Date:    Mon Nov 4 06:22:21 PST 1996
>Last-Modified:  Mon Nov  4 06:22:52 PST 1996
>Originator:     Wilhelm B. Kloke
>Release:        FreeBSD 2.0-RELEASE i386
>Organization:
Dipl.-Math. Wilhelm Bernhard Kloke
Institut fuer Arbeitsphysiologie an der Universitaet Dortmund
Ardeystrasse 67, D-44139 Dortmund, Tel. 0231-1084-257
>Environment:

	FreeBSD 2.0-RELEASE i386
	ffs filesystem 

>Description:

	I used pax -rwl to make a hard linked copy of a diskless
	root directory.

	/usr/diskless/kjartan contained the original, and 
	/usr/diskless/template was to contain the links.
	I tried pax -rwl -s/^kjartan/template/ kjartan .
	to make the links.
	Probably, because kjartan contained the symbolic link
	gisli -> /usr, I got hard links on directories,
	which made the directory tree containing cycles,
	e.g. /usr/diskless/template/gisli was made a hard link to /usr.

>How-To-Repeat:

	Sorry. I don't want to repeat this desaster.

>Fix:
	
	The docs contain a hint that warns about unpredictable
	results using -rw, if the dest dir is a member of the
	file hierarchy rooted at the source.
	But soft links should not be made hard in the copy.
	Probably the code making links should check for directories,
	anyway.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->ache 
Responsible-Changed-By: scrappy 
Responsible-Changed-When: Fri Apr 12 22:08:05 PDT 1996 
Responsible-Changed-Why:  
Responsible-Changed-From-To: ache->freebsd-bugs 
Responsible-Changed-By: scrappy 
Responsible-Changed-When: Thu Apr 18 11:33:04 PDT 1996 
Responsible-Changed-Why:  
State-Changed-From-To: open->feedback 
State-Changed-By: scrappy 
State-Changed-When: Tue Oct 22 20:34:05 PDT 1996 
State-Changed-Why:  

Confirm Status 
State-Changed-From-To: feedback->closed 
State-Changed-By: scrappy 
State-Changed-When: Mon Nov 4 06:22:21 PST 1996 
State-Changed-Why:  

Originator Confirmed Closure 
>Unformatted:


