Path: utzoo!utgpu!water!watmath!clyde!ima!minya!jc From: jc@minya.UUCP (John Chambers) Newsgroups: comp.unix.wizards Subject: Re: relative pathname question! Message-ID: <61@minya.UUCP> Date: 10 Aug 88 03:34:54 GMT References: <1670003@hpcilzb.HP.COM> <5762@super.upenn.edu> <5103@rpp386.UUCP> Organization: (none) Lines: 29 In article <5103@rpp386.UUCP>, jfh@rpp386.UUCP (John F. Haugh II) writes: > In article <5762@super.upenn.edu> spolsky@eniac.seas.upenn.edu.UUCP (Joel Spolsky) writes: > >As far as I can tell, there is NO way to extract tar files with > >absolute pathnames anywhere except their original positions. > > sure is, and a damned clever one at that. its called "sub-system root". > look up chroot(2) in your unix manual. Or, if you have the source lying about, there's an even better solution, which I've snuck into the libraries of a few systems. It is easy to spot the point at which the code has a pointer to the name of a file about to be created. You just insert a line like: while (*filename == '/') ++filename; and recompile. [The actual name isn't 'filename'; I've forgotten what it is. But no big deal; it's easy to find.] It works fine, and nobody on your system is ever again bothered by tar tapes with absolute pathnames. You might also hit the tar.1 manual page while you're at it. Too bad we don't all have source. Is there perhaps a PD version of tar lurking about somewhere? -- John Chambers <{adelie,ima,maynard,mit-eddie}!minya!{jc,root}> (617/484-6393) [Any errors in the above are due to failures in the logic of the keyboard, not in the fingers that did the typing.]