5 Jun
2006
5 Jun
'06
17:20
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, set the user id, and exec() to the remainings of arg[] (or /bin/bash if empty). Thanks, that's the sort of help I wanted. -- Bernd Paysan "If you want it done right, you have to do it yourself" http://www.jwdt.com/~paysan/