Re: Different roots for each process possible?
Each process has a port that is its root directory, just as it has a port
that is its current working directory. The root directory port is
inherited by fork/exec just like the current directory port is. This is
how chroot works (the other piece of chroot is a filesystem RPC used to get
a directory port that doesn't let /.. get out of the chosen "root"
directory). As with chroot on Unix, a setuid program (called a secure exec
in Hurdish) reverts to the global root directory port. So, modulo setuid,
you can chroot your shell to a filesystem of your choice and the processes
that descend from it will see that filesystem as the root for their lookups.
So, by setting a translator the implements the filesystem name space you
want to see on ~/myroot, you can do "chroot ~/myroot" to go into that world.
Reply to: