Client				Daemon				Daemon/handler			Daemon/relay			Daemon/command
------				------				--------------			------------			--------------

Read config file
Stat NFS share device numbers
Connect
				Accept connection
				Allocate handler data
Send VERSION			Send VERSION
Check version			Check version
Send AUTH INFO
				Receive AUTH INFO
				Get user information
				Read user config file
				Check password
				Send AUTH OK
Receive AUTH OK
Send CMD INFO
Set terminal to raw mode	Receive CMD INFO
Set stdout/stderr non-blocking	Create directories
Send OUT REQ			Mount filesystems
				Fork handler process
				Store handler's mounts		Fork fakeroot relay process
								Fork command with PTY		Stat NFS mount device numbers
								Set command stdin non-blocking					Change root directory
								Receive OUT REQ							Get user information
								Send IN REQ							Change user and group id
Receive IN REQ															Validate shell
Send IN DATA from stdin														Change environment
								Receive IN DATA to buffer					Change current directory
																Execute command
								Write buffer to stdin/PTY
								Send OUT DATA from stdout/PTY					Read from stdin
Receive OUT DATA to buffer					Send IN REQ
Write buffer to stdout
Receive IN REQ
Send OUT REQ
Send IN DATA from stdin						Receive OUT REQ
								Receive IN DATA to buffer
								Write buffer to stdin/PTY
								Send OUT DATA from stdout/PTY					Read from stdin
Receive OUT DATA to buffer					Send IN REQ							Connect to fakeroot relay
Write buffer to stdout										Accept connection
Receive IN REQ											Connect to fakeroot daemon	Send fakeroot message
Send OUT REQ											Receive message from command
												Translate device number
												Send message to daemon
												Receive message from daemon
												Restore device number
												Send message to command
																Receive fakeroot message
																Write to stdout
								Send OUT DATA from stdout/PTY					Exit
Receive OUT DATA to buffer					Get command return code		Command closed connection
Write buffer to stdout						Terminate relay			Close connection to daemon
								Send RC				Terminated
Receive RC							Exit
Restore terminal mode		Release handler's mounts
Exit with return code
