set $MAIL env variable

better error messages

make command-line options like ssh

rex exits with not necessarily the correct exit code (sometimes from a
previous failed command).  Also exit code of: rex -t XXXX grep

resume cached connection if the client changes IP addresses (deal with
the EXIT error that rex gives gracefully).  We shouldn't have to type
sfskey sesskill ....

rex hostname (where the rex machine doesn't have SRP data)
  forward you to the authserver for the realm
rex hostname should be default do SRP is certprog stuff fails

when rexing to a linux box, there are still intermittent problems
  where and REXCB_EXIT rpc gets sent back before the REXCB_DATA
  and the channel gets closed and the data is never output 
  (in fact the rex client reponds "false" to the DATA RPC).
  The problem doesn't seem to happen on a FreeBSD server
  On linux, there is an error message in the log files like this:
     proxy: chanfd::rcb:read(67), rexfd:1: Input/output error
Also, the current window size doesn't get set before the command
in question executes in general.  Occaisionally, the remote program
will have the correct size.

sync the sfs_users files out to other "backup" authservs
make sure the listen,connect, and moduled die when the're "done"
kill ptyd when sfssd dies
sfskey sesskill kills proxy on the remote side?  or timeout?
selective forwarding policy
audit trail
rex modules (do they work in the other direction; forward port forwarding)
new authserver (merge admin realms, distributed groups)

check clnt_stat before unmarshalling arguments. 

when the proxy receives an EOF from a client, it should close all
the fds open with those modules.  KILL signal would be even more
effective at cleaning up modules but might wipe out data that module
is still writing to a socket.  therefore, it should be the modules
responsibility to clean itself up when it gets an EOF.

need to write a preexit function in REX client that checks for pending
port forwarding connections, etc.  and has an option for "background"
operation like ssh

We have a verbose mode--the most important types of messages that
should be reported are the events that rex is waiting for.  for
example, "waiting for agent (sfscd) file descriptor"

fix readcb IO errors when you close a channel/connection

the agent should clean up it's state if sfssd is killed and restarted
by the system administrator

put escape seq. stuff in for exec channel also & add command-line option

*Need to make rexd create the /tmp/.X11-unix directory

*pipe through rex (like ssh)

*maybe default mode for running a command (not interactive) should
*  be to have no tty; then user can request a tty is wanted (like ssh)

*rex -T -X /sfs/pdos.lcs.mit.edu/grape-bay cat /etc/motd > blah
*pure virtual method called
*zsh: 23809 abort (core dumped)  rex -T -X /sfs/pdos.lcs.mit.edu/grape-bay cat /etc/motd > blah
*[status 134]

*default should be to not have tty support if you're going to just
*running a command

*use SRP to get hostname if no self-certifying pathname is available

*connection from A -> B is cached under B's hostid
*connection from B -> C is cached under C's hostid
*then if I connect from A -> C will that generate a new sesskey or
*  use the B -> C one?
*It will use the B->C one which is really just the agent->C one.

*add verbosity option so we don't see log messages all of the time.
*also, can we get the messages that sfssd spits out on error; they're
*often more useful

*fix the problem of rex not exited b/c it doesn't receive all of the
*appropriate exit signals
*(I think this is fixed)

*sometimes when a command isn't found rex will refuse to shutdown and
*reset the terminal, requiring a kill from another window:
*   rex -x /shome/shakespeare sdfljaslkd  (for example)
*(same problem as above I think)

*ideally ptyd should calculate the host from which a rex connection
*comes and that's what should be logged into the utmp, etc.

*rex hangs sometimes with "rex -X pdos.lcs.mit.edu/am ps"
  (I think that this one is gone...bug in the tty code)

*rex -m 'moduled connect localhost:80' 'listen 8888' pdos.lcs.mit.edu/am
*rex -m 'moduled connect $SSH_AUTH_SOCK' 'listen -u aaaa' pdos.lcs.mit.edu/am
*rex -m 'moduled connect localhost:6000' 'listen 6099' pdos.lcs.mit.edu/am
  DISPLAY=:99 xclock

*rex -m "moduled connect $SSH_AUTH_SOCK" "/home/am0/kaminsky/bin/mylisten /tmp/sfs-kaminsky3" /shome/am -- /usr/local/bin/bash -c 'export SSH_AUTH_SOCK=/tmp/sfs-kaminsky3/socket && export ZDOTDIR=~/.zsh && exec /usr/local/bin/zsh -l'
====> (see rex-ssh script)

*performance
*forward /sfs files (we do it via a shell script because rex is so cheap)
*better sfskey sesskill syntax
*better sfskey sesslist output
*rex duplicates output with "rex -X pdos.lcs.mit.edu/am ps" because
*  two DATA RPCs are sent from the server

NEW IDEA
---------
use the file system and self-certifying pathnames to name:
  * files and directories (OLD)
  * users, groups, and servers (for remote login)
  * ACLs can specify remote users and groups through FS

integrate rex with file system
user point of view (client vs. server sharing)
admin point of view 
