On Monday 05 June 2006 19:20, Bernd Paysan wrote:
On Friday 02 June 2006 23:39, Andi Kleen wrote:
A possible different way would be to create a new name space using clone(CLONE_NEWNS) and overwrite all binaries/directories you want to be different with mount --bind in the new name space.
There isn't a program included to do this but it should be relatively easy to write.
Sounds like ~10 lines of code, i.e. clone with the CLONE_NEWNS flag, and if you get a pid, wait for exit of all childs and exit(), otherwise mount() to "/lib" with the MS_BIND flag
mount --bind works for files too. You can only overwrite /lib/ld-linux.so and keep the rest of /lib.