head	1.32;
access;
symbols
	tame-0-4:1.32.0.2
	SFS_O_7_2:1.32
	SFS_O_7_1:1.32
	SFS_0_7:1.32
	AUTHSERV1:1.30.0.2
	PUBKEY2:1.28.0.4
	SFS_0_6:1.28
	EXTAUTH:1.28.0.2
	mp-async-bp:1.14
	mp-async:1.14.0.2;
locks; strict;
comment	@# @;


1.32
date	2002.10.11.19.12.56;	author kaminsky;	state Exp;
branches;
next	1.31;

1.31
date	2002.08.27.04.01.19;	author kaminsky;	state Exp;
branches;
next	1.30;

1.30
date	2002.07.25.23.45.57;	author kaminsky;	state Exp;
branches;
next	1.29;

1.29
date	2002.07.25.21.54.52;	author kaminsky;	state Exp;
branches;
next	1.28;

1.28
date	2002.05.29.19.34.37;	author kaminsky;	state Exp;
branches;
next	1.27;

1.27
date	2002.05.23.15.52.22;	author kaminsky;	state Exp;
branches;
next	1.26;

1.26
date	2002.05.20.21.15.11;	author kaminsky;	state Exp;
branches;
next	1.25;

1.25
date	2002.05.20.20.44.04;	author kaminsky;	state Exp;
branches;
next	1.24;

1.24
date	2002.05.20.19.52.39;	author kaminsky;	state Exp;
branches;
next	1.23;

1.23
date	2002.05.10.03.02.39;	author kaminsky;	state Exp;
branches;
next	1.22;

1.22
date	2002.04.12.07.14.41;	author kaminsky;	state Exp;
branches;
next	1.21;

1.21
date	2002.04.10.21.30.39;	author kaminsky;	state Exp;
branches;
next	1.20;

1.20
date	2002.04.10.20.07.14;	author kaminsky;	state Exp;
branches;
next	1.19;

1.19
date	2002.03.26.05.00.11;	author kaminsky;	state Exp;
branches;
next	1.18;

1.18
date	2002.03.14.17.30.20;	author kaminsky;	state Exp;
branches;
next	1.17;

1.17
date	2002.03.13.19.19.14;	author kaminsky;	state Exp;
branches;
next	1.16;

1.16
date	2002.03.12.20.59.11;	author kaminsky;	state Exp;
branches;
next	1.15;

1.15
date	2002.03.11.22.09.11;	author kaminsky;	state Exp;
branches;
next	1.14;

1.14
date	2001.12.19.23.24.32;	author kaminsky;	state Exp;
branches;
next	1.13;

1.13
date	2001.12.13.19.01.58;	author kaminsky;	state Exp;
branches;
next	1.12;

1.12
date	2001.12.06.19.57.15;	author kaminsky;	state Exp;
branches;
next	1.11;

1.11
date	2001.12.05.20.33.21;	author kaminsky;	state Exp;
branches;
next	1.10;

1.10
date	2001.11.29.19.54.01;	author kaminsky;	state Exp;
branches;
next	1.9;

1.9
date	2001.11.14.00.42.17;	author kaminsky;	state Exp;
branches;
next	1.8;

1.8
date	2001.11.13.05.48.22;	author kaminsky;	state Exp;
branches;
next	1.7;

1.7
date	2001.11.09.18.21.42;	author kaminsky;	state Exp;
branches;
next	1.6;

1.6
date	2001.11.08.02.06.56;	author kaminsky;	state Exp;
branches;
next	1.5;

1.5
date	2001.07.26.04.39.12;	author ericp;	state Exp;
branches;
next	1.4;

1.4
date	2001.07.25.19.35.13;	author kaminsky;	state Exp;
branches;
next	1.3;

1.3
date	2001.07.19.03.42.17;	author ericp;	state Exp;
branches;
next	1.2;

1.2
date	2001.06.26.06.16.18;	author ericp;	state Exp;
branches;
next	1.1;

1.1
date	2001.05.16.09.39.42;	author ericp;	state Exp;
branches;
next	;


desc
@@


1.32
log
@initial merge of George Savvides's ACL support for SFS; needs testing
@
text
@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 
@


1.31
log
@more changes for caching srp host retrievals
@
text
@d1 2
@


1.30
log
@updated
@
text
@d59 2
@


1.29
log
@updated
@
text
@d1 1
a1 2
better error messages (if no rexd/sfssd is running on remote machine
    you get a weird message about not contacting agent)
a6 3

make rex fall-back to non X-forwarding instead of dying if server
doesn't support it
@


1.28
log
@minor update
@
text
@d1 2
a2 1
better error messages
@


1.27
log
@updated
@
text
@d1 1
a1 1
better error messages (like for a command not found)
d36 1
a36 2
rex PATH
rex modules (do they work in the other direction)
@


1.26
log
@better error output
@
text
@a4 5
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]

a29 3
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)
pipe through rex (like ssh)
a38 7
paper outline
  revocation path
  cross-realm distributed system
  merging
  group sharing
  run code for auth
  SRP
d52 1
a52 1
We hava a verbose mode--the most important types of messages that
d62 10
@


1.25
log
@update todo; new command-line options to make tty support more like ssh
@
text
@d1 2
a4 3
default should be to not have tty support if you're going to just
running a command

d10 2
a11 2
rex exits with no necessarily the correct exit code (sometimes from a
previous  failed command)
d77 3
@


1.24
log
@stuff's been added
@
text
@d14 3
@


1.23
log
@updated
@
text
@d1 13
a17 5
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?

d20 1
d76 7
a82 1
use SRP to get hostname if no self-certifying pathname is available
d118 10
@


1.22
log
@updated
@
text
@d1 9
d24 3
@


1.21
log
@updates to todo list
fix formatting
@
text
@d3 12
@


1.20
log
@update todo
and fix initialization bug in rex
@
text
@a4 2
rex duplicates output with "rex -X pdos.lcs.mit.edu/am ps" because
  two DATA RPCs are sent from the server
a19 16
*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
------------
a35 3
ideally ptyd should calculate the host from which a rex connection
comes and that's what should be logged into the utmp, etc.

a37 4
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

d41 1
a41 2
fix the problem of rex not exited b/c it doesn't receive all of the
appropriate exit signals
d43 1
a43 4
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)
d45 23
a67 1
put escape seq. stuff in for exec channel also & add command-line option
d69 2
a70 1
use SRP to get hostname if no self-certifying pathname is available
d72 6
a77 1
audit trail
a78 1
view of /sfs directory should be there same on all machines rex'ed to?
@


1.19
log
@updated todo list
cosmetic changes to sfsmisc files
@
text
@a6 2
better sfskey sesskill syntax
better sfskey sesslist output
d35 2
@


1.18
log
@expand default rex path to include /usr/local/{bin,sbin}
@
text
@d1 2
d5 2
a11 2
rex hostname (where the rex machine doesn't have SRP data)
  forward you to the authserver for the realm
a12 1
forward /sfs files
d24 6
a29 3
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
d32 2
a33 1
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'
d36 1
@


1.17
log
@big performance boost
@
text
@d1 2
d13 1
a13 2
revocation path
rex modules
d16 1
d27 2
@


1.16
log
@more fixes
@
text
@a8 1
performance
d21 3
a23 3
rex -m 'moduled nc localhost 80' 'socklisten 8888' pdos.lcs.mit.edu/am
rex -m 'moduled ./tcppipe /tmp/ssh-XXu9PMne/agent.516' 'socklisten -u aaaa' pdos.lcs.mit.edu/am
rex -m 'moduled nc localhost 6000' 'socklisten 6099' pdos.lcs.mit.edu/am
d25 2
@


1.15
log
@*** empty log message ***
@
text
@d1 4
@


1.14
log
@a few more items
@
text
@d1 22
@


1.13
log
@fixed raw mode entering/exiting bug
added ~^Z suspend escape sequence
@
text
@d38 6
@


1.12
log
@pty and sessreg related cleanups
@
text
@d13 3
a15 4
need a verbose mode activated by a rex commandline option.  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"
@


1.11
log
@fixed sessreg invocation so that it works on OpenBSD (and FreeBSD ?).
ptyd wasn't associated with a terminal and so ttyslot () was failing.
@
text
@a17 4
fixed sessreg invocation on OpenBSD (FreeBSD?).  Now still the pty # 
shows up wrong on Linux.  Need also to be transparent if SESSREG
isn't defined.  Also, include OpenBSD copyright notice?

@


1.10
log
@added support for ~ escape sequences in tty-based rex logins
(see ~? for options)
@
text
@d18 3
a20 4
need to move away from sessreg in ptyd.C and go to something more
OpenSSH like that uses autoconf to determine the correct way to access
the logs on a given system.  Perhaps we should just include their code
and autoconf macros/checks?
@


1.9
log
@if x-forwarding is off, make sure the DISPLAY variable isn't set
@
text
@d42 2
@


1.8
log
@reorganized ttyd to use aspawn() instead of fork/exec.  Now we can properly
return an error code to rex when the user tries to run a program that isn't
there.
@
text
@a37 3
kill the DISPLAY variable if we "rex -x" after a rex which had x-forwarding
(proxy holds on to the variable)

d41 1
@


1.7
log
@updated
@
text
@a34 2
make sure to return an error if the program to execute isn't found (also with -T)

a37 2
fix the environment pollution that happens on linux

d40 4
@


1.6
log
@more error handling for async shutdown of a channel.  Also return the
exit code of the tty/exec channel process as the exit code of the rex
client.
@
text
@a25 2
return value from remote command should be returned by the local rex client

a27 2
clean-up /tmp/.X11-unix dir

d37 7
a43 1
fix the problem of rex not exited b/c it doesn't receive all of the appropriate exit signals@


1.5
log
@proxy side fixes plus removed old entries from todo
@
text
@d38 4
@


1.4
log
@fix environment setup to avoid clobbering variables
various code-cleanups
update todo.txt
@
text
@d1 1
a1 10
check clnt_stat before unmarshalling arguments. I think this is mainly
an issue with RPC reply callbacks

in rex, still possibility of race condition even if you use the
sess->makechannel(channel,madechannelcb), this is because a channel
is made after a fork.  but server side module might still be setting
up it's server side connection after fork (like binding to port/unix
domain socket).
Therefore, leave it to the specific channel class to handle completion
notification.
a8 3
need to add an eofcb to rexsession constructor, since sfsagent and rex client
need to do totally different things in these situations

a12 3
shutdown shouldn't be public member of rexfd, make a flush function that
instead adds a shutdown to pending i/o

a16 2

find out how to disable rcb in aios
@


1.3
log
@changes in preparation for {list,kill}sess support in agent
@
text
@d34 21
@


1.2
log
@xauth support, untested
@
text
@d27 7
@


1.1
log
@basic X forwarding.  still missing xauth functionality.
also doesn't parse DISPLAY on rex client side, hardcoded to :0.0
@
text
@d25 2
@

