Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!batcomputer!gdykes From: gdykes@theory.tn.cornell.edu (Gene Dykes) Newsgroups: comp.sys.hp Subject: Serious tar bug Message-ID: <1991Jan2.221811.26074@batcomputer.tn.cornell.edu> Date: 2 Jan 91 22:18:11 GMT Sender: gdykes@batcomputer.tn.cornell.edu (Gene Dykes) Organization: Cornell Theory Center Lines: 46 Would somebody please try to duplicate this? I'm running HPUX 7.0 on a 9000/835. It would be interesting to know how widespread this bogosity is... HP, Please note! I have uncovered a very serious error in tar. When told to follow symbolic links, it sometimes gets confused and starts dumping bizarrely, even though there is no recursion in the directory structure. To illustrate, the following commands mkdir d1 cd d1 mkdir d2 d3 cd d2 ln -s ../d3 d4 cd ../.. produce a tree that looks like this: d1 |\ | \ | \ d2 d3 | ^ | | | | d4--- The only critical feature here is that there be a directory which is a symbolic link to a subdirectory of the parent's parent, in this case d4 points to d3. Note that this is not recursive. We would expect that d3 will get dumped twice, but instead, tar gets very confused and starts dumping all sorts of bizarre areas of the users file system. To see for yourself, execute the following command after creating the tree with the above script, but keep your finger poised on your kill key... tar chvf /dev/null d1 -- Gene Dykes, gdykes@theory.tn.cornell.edu