On Sat, Feb 03, 2001 at 12:32:50PM -0700, Warner Losh wrote:
> In message <[EMAIL PROTECTED]> Peter Wemm writes:
> : As bizzare as it sounds, I like Julian's hack for populating this stuff...
> : ie: use a hard link to propagate nodes to the jailed /dev.
> : 
> : eg: mount -t devfs -o empty /home/jail/dev
> : ln /dev/null /home/jail/dev/null
> : ln /dev/zero /home/jail/dev/zero
> : ...
> : mount -u -o ro /home/jail/dev
> 
> But you can't do hard links accross file systems.

Actually, you've always been able to do things like this.  For
example:

        ln /proc/curproc/file /test

on a 3.X machine will produce a hard link to ln in / - it doesn't
work any more 'cos /proc/curproc/file is now a soft link. I presume
the same thing works with fdescfs.

This is actually one nice feature Linux procfs has: I once was
asked to look at a Linux box someone had broken into. They'd deleted
all the files in /var/log, but hadn't HUPed syslogd - so I just
hard linked them all back into place again. Not an every day use,
but...

        David.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to