🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.sys5
Article #383

cpio unlinks directories

#383
From: Chris Bertin
Date: Mon, 15 Apr 1991 20:56
21 lines
1338 bytes
Cpio silently unlinks directories if you extract a file from an archive and
that file happens to be a directory on your file system: If you have a
directory '/x' and if you extract from an archive a file called '/x', the
entire '/x' tree is replaced with the '/x' file. The same is also true if
a file name matches any type of special file. Basically, cpio does an unlink()
on that name and doesn't care what it unlinks.

This is true on SVR3 and SVR4. It may also be true on SunOS and BSD, but I
couldn't try it as super-user on those systems (yes, you do have to be root
to unlink directories, so that problem only shows up if you run cpio as root).

It is unclear to me what cpio should do in cases when there is a file type
conflict between an archive and the file system, but I don't think cpio should
EVER unlink directories.

Chris

-- 
Chris Bertin		|   chrisb@risky.Convergent.COM
Unisys			|		or
(408) 435-3762		| ...!uunet!pyramid!ctnews!risky!chrisb
Technical Details
Message-ID: <4042@risky.Convergent.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!voder!pyramid!ctnews!risky!chrisb

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!voder!pyramid!ctnews!risky!chrisb
From: chrisb@risky.Convergent.COM (Chris Bertin)
Newsgroups: comp.bugs.sys5
Subject: cpio unlinks directories
Message-ID: <4042@risky.Convergent.COM>
Date: 15 Apr 91 20:56:22 GMT
Organization: Convergent Technologies, San Jose, CA
Lines: 21