Article View: comp.bugs.2bsd
Article #36bug in tar's handling of absolute paths
From: Steven M. Schultz
Date: Tue, 03 Oct 1989 20:38
Date: Tue, 03 Oct 1989 20:38
40 lines
1311 bytes
1311 bytes
Subject: bug in tar absolute pathname handling +FIX
Index: bin/tar.c 2.10BSD
Description:
Tar will not correctly handle absolute paths unless
you start them from /
Repeat-By:
cd /usr/src/sys
tar c /usr
Fix:
Apply the following patch.
-------------------------- CUT HERE -----------------------
*** tar.c.orig Sat Apr 26 07:35:13 1986
--- tar.c Tue Oct 3 15:27:47 1989
***************
*** 361,367 ****
argv++;
continue;
}
! parent = wdir;
for (cp = *argv; *cp; cp++)
if (*cp == '/')
cp2 = cp;
--- 361,373 ----
argv++;
continue;
}
!
! if (*argv[0] == '/'){
! parent = "";
! } else {
! parent = wdir;
! }
!
for (cp = *argv; *cp; cp++)
if (*cp == '/')
cp2 = cp;
Technical Details
Message-ID:
<37678@wlbr.IMSD.CONTEL.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!uakari.primate.wisc.edu!gem.mps.ohio-state.edu!apple!voder!wlbr!wlv.imsd.contel.com!smsShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!uakari.primate.wisc.edu!gem.mps.ohio-state.edu!apple!voder!wlbr!wlv.imsd.contel.com!sms From: sms@wlv.imsd.contel.com (Steven M. Schultz) Newsgroups: comp.bugs.2bsd,comp.bugs.4bsd Subject: bug in tar's handling of absolute paths Message-ID: <37678@wlbr.IMSD.CONTEL.COM> Date: 3 Oct 89 20:38:20 GMT Sender: news@wlbr.IMSD.CONTEL.COM Reply-To: sms@wlv.imsd.contel.com (Steven M. Schultz) Followup-To: comp.bugs.2bsd Organization: Contel Federal Systems Lines: 40