Path: utzoo!utgpu!attcan!lsuc!eci386!clewis From: clewis@eci386.uucp (Chris Lewis) Newsgroups: comp.unix.xenix Subject: Re: Linking directories on Xenix??? Message-ID: <1989Aug21.202833.23597@eci386.uucp> Date: 21 Aug 89 20:28:33 GMT References: <1114@ispi.UUCP> Reply-To: clewis@eci386.UUCP (Chris Lewis) Organization: R. H. Lathwell Associates: Elegant Communications, Inc. Lines: 31 In article <1114@ispi.UUCP> jbayer@ispi.UUCP (Jonathan Bayer) writes: >I have a need to be able to link a directory to another directory. I >know that it normally is not possible, but I was wondering if there was >a way to fool the OS into linking a directory to another? The problem >is here because I have a program that for safety's sake must run >chroot'ed in a directory, but also has to have access to the standard >/etc directory, and has to be able to create files in /etc that will be >there later. > >Any ideas? Getting the files in is easy: ln /etc/* /etc/rootdir/etc Getting them out ain't, though as long as these files aren't deleted, you could "touch" 'em in /etc and link 'em to /etc/rootdir/etc. Or simply copy the files back after your special application runs. Frankly, if you don't trust the program to run without chrooting, I don't know why you'd trust it enough to have /etc writeable. Are you concerned about integrity or security? You could hard "link" (rather than ln) the directory as root, but a hostile program might be able to break the chroot by chdir("..")'ing. -- Chris Lewis, R.H. Lathwell & Associates: Elegant Communications Inc. UUCP: {uunet!mnetor, utcsri!utzoo}!lsuc!eci386!clewis Phone: (416)-595-5425