Linking directories on Xenix???

Chris Lewis clewis at eci386.uucp
Tue Aug 22 06:28:33 AEST 1989


In article <1114 at ispi.UUCP> jbayer at 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



More information about the Comp.unix.xenix mailing list