Module Name: src Committed By: pooka Date: Mon Feb 14 14:56:23 UTC 2011
Modified Files: src/lib/librumpclient: rumpclient.c rumpclient.h src/lib/librumphijack: hijack.c src/lib/librumpuser: sp_common.c Log Message: A bunch of changes which essentially make sshd work with a hijacked rump tcp/ip stack: * sshd likes to fork and then re-exec itself ==> trap execve() and augment the env with the current parameters essential to a rump kernel (kernel communication fd, information about dup2'd file descriptors) * sshd likes to play lots of games with pipes, socketpairs and dup{,2}() ==> make sure we do not close essential rump client descriptors: dup() them to a safe place, except for F_CLOSEM where we simply leave them alone. also, partially solved by the above, make sure the process's set of rump kernel descriptors persists over exec() * sshd likes to chdir() before exec ==> for unix-style rump_sp(7) sockets save the full path on the initial exec and use it afterwards. thread the path through the environment in execve() To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/lib/librumpclient/rumpclient.c cvs rdiff -u -r1.5 -r1.6 src/lib/librumpclient/rumpclient.h cvs rdiff -u -r1.38 -r1.39 src/lib/librumphijack/hijack.c cvs rdiff -u -r1.26 -r1.27 src/lib/librumpuser/sp_common.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.