2001-12-23 Per Cederqvist <ceder@lysator.liu.se> Release administrativia. * configure.in: Version 1.2. * README.DEVO: Updated autoconf and automake versions. * NEWS: Updated for the 1.2 release. * Copyright year updated in all relevant files. Use Bugzilla for bug reporting. * README: Mention Bugzilla. * fsh.texi (Bugs): Mention Bugzilla. Port to Python 2.2. (Bug 332). * fshcompat.py: New module, that finds some constants in os, fcntl, FCNTL or thin air depending on Python version. * fshlib.py: Use fshcompat instead of FCNTL. * infshd.py: Ditto. * Makefile.am (pkgdata_DATA): Added fshcompat.py. 2000-12-10 Per Cederqvist <ceder@moria> * Release 1.1. Release administrativia. * configure.in: Version 1.1. * NEWS: Set the release date for 1.1. Fix various clean targets. * Makefile.am (MOSTLYCLEANFILES): New variable: remove built stuff. (MAINTAINERCLEANFILES): New variable: remove everything that can be built, if you have the tools mentioned in README.DEVO. (EXTRA_DIST): Added README.DEVO, RELEASING and mkrel.sh. (DISTCLEANFILES): New variable: remove configuration stuff. (dist-hook): Don't distribute fshconfig.py or fshversion.py. 2000-12-04 Per Cederqvist <ceder@paragon.cendio.se> Clean up usage error messages. * infshd.py (main): Handle getopt errors properly. * fsh.py (main): Handle getopt errors properly. 2000-12-03 Per Cederqvist <ceder@moria> * RELEASING: Added gpg info and mailing lists. * Snapshot release 1.0.post.5. Portability fix. * fshd.py (open_fds): Use RLIMIT_NOFILE instead of RLIMIT_OFILE. It seems to be more portable. Improve the documentation. * fsh.texi (Bugs): New chapter. Check for out-of-memory in fcpwrap. * fcpwrap.c (main): Check the return value of malloc(). OpenSSH 2.x support in fcp. * fcpwrap.c (main): OpenSSH 2.x likes to pass options as "-oFoo Bar", not as "-o", "Foo Bar" as fcpwrap expected. Reported by Tommi Virtanen. fshd now exits after ten hours idle time. The timeout is configurable via the --enable-timeout configure option, and the --timeout runtime option. * README: Mention fsh configure options. Mention fsh-announce under the "New releases" heading. * fsh.texi (Invoking fshd): Stress that this command is not normally used. Document --timeout. Rearrange the text. (Invoking fsh): Document --timeout. Rearrange the text. (Using with CVS): Don't require password-less login. (Remote protocol): We use $SHELL to execute commands, not necessarily the login shell. Comment out the "core-dumped" flag, since it isn't currently used. Markup added. * infshd.py (main): Added an assertion. * fshd.py (client.select_set): Return a "live" flag. (fshd.__init__): New argument: timeout. (fshd.setup_timer): New method. (fshd.cancel_timer): New method. (fshd.timeout): New method. (fshd.toploop): Handle timeouts. (usage): Document -T (--timeout) and --background. Print out the options only if -h is given. (main): Handle -T, --timeout and --background. * fshconfig.py.in: New file. (default_fshd_timeout): New configure value. * fsh.py (remote.__init__): New argument: fshd_timeout. Pass it on to fshd, if we start one. (docmd): New argument: fshd_timeout. (usage): Document -T (--timeout). Print out the options only if -h is given. (main): Handle -T (--timeout). * configure.in: New argument: --enable-timeout. Generate fshconfig.py. * Makefile.am (pkgdata_DATA): Added fshconfig.py. (BUILT_SOURCES): Added fshconfig.py. (fshversion.py): Improved generation of the file slightly. 2000-11-27 Per Cederqvist <ceder@lysator.liu.se> * Snapshot release 1.0.post.4. * README: Mention the new mailing lists. The socket directory creation was unsafe. * fshd.py (fshd.__init__): Be more careful when creating the socket directory. This should fix Debian bug #75291 (unsafe #creation of fshd socket dir), reported by Colin Phipps. * NEWS: Mention the security problem. 2000-11-12 Per Cederqvist <ceder@lysator.liu.se> * Snapshot release 1.0.post.3. Speed up the reaping of exit statuses. * infshd.py (session.select_action): Added a return value that indicates if eof was detected. (infshd.toploop): Decrease the select timeout if a session hit eof, so that the wait polling is speeded up. Python 1.5.2 compatibility. * fshlib.py (shell_unquote): Use string.atoi() instead of int() for Python 1.5.2 compatibility. 2000-11-12 Per Cederqvist <ceder@moria> * THANKS: Mention Erik Demaine. 2000-11-11 Per Cederqvist <ceder@moria> * Snapshot release 1.0.post.2. Fix TeX problems. * fsh.texi (Top): This node is needed even in TeX mode. Release work. * Copyright year updated in all relevant files. * mkrel.sh: Use "make distcheck" to create releases. Background later, so that the "host key not found" message isn't lost, and so that a user can reply to login prompts from ssh. * fshd.py (remote.__init__): New argument: background_wanted. Caller updated. (remote.poll_response): Background once the "fsh 1" response is received. (fshd.__init__): New argument: background_wanted. Caller updated. (background): Only close file descriptors 0, 1 and 2. (open_fds): New function. (main): Don't background the process here, but close all high file descriptors. Handle "-r method" even if method contains slashes or other peculiar characters. Reported by Tommi Virtanen. * THANKS: Mention Tommi Virtanen. * fsh.texi (Invoking fshd): Doument that the method argument is encoded. (Local protocol): Fixed description of the socket name. * fsh.py (remote.__init__): Use fshlib.fshd_socket() to compute the name of the socket. Quote the method argument sent to fshd. * fshd.py (fshd.__init__): Use fshlib.fshd_socket() to compute the name of the socket. Avoid using "dir" as a variable name. (main): Unquote the method argument. * fshlib.py (fshd_socket): New function, that quotes the arguments so that the socket name is always a valid file name. (__safe_chars): New constant. (shell_quote): New function. (shell_unquote): New function. 1999-11-05 Per Cederqvist <ceder@lysator.liu.se> * Snapshot release 1.0.post.1. * fsh.py (main): The --version switch was broken. Fix. 1999-11-04 Per Cederqvist <ceder@lysator.liu.se> Documentation fixes. * fsh.texi: Typos fixed. Some very minor clarifications. Close a couple of unused filescriptors. * fshd.py (remote.__init__): Close two forgotten file descriptors in the child. 1999-11-03 Per Cederqvist <ceder@lysator.liu.se> Increased rsh compatibility: allow "-l user" after the host. * fsh.py (main): Accept "fsh host -l user cmd". Previously, only "fsh -l user host cmd" was allowed. 1999-05-09 Per Cederqvist <ceder@lysator.liu.se> * Release 1.0. Release administrativia. * configure.in: Version 1.0. * NEWS: Set the release date for 1.0. 1999-04-24 Per Cederqvist <ceder@lysator.liu.se> * Snapshot release 0.3.post.1. Release administrativia. * NEWS: Mention fcp. The next release will be 1.0. * README: Mention fcp. State that we need Python 1.5.2. * configure.in: Version 0.3.post.1. * TODO: No showstoppers left? * RELEASING: "make distcheck" is a good thing to do. Added "fcp", an "scp" drop-in replacement, and "fcpwrap", which is used by fcp. * NEWS: Mention fcp. * fsh.texi (Invoking fcp): New node. * Makefile.am (bin_SCRIPTS): Added fcp. (libexec_PROGRAMS): New variable. Added fcpwrap. (fcpwrap_SOURCES): New variable. Added fcpwrap.c. (EXTRA_DIST): Added fcp.sh. (fcp): New target. * fcp.sh: New file: a simple scp wrapper that uses fcpwrap. * configure.in: Use AC_PROG_CC and AM_PROG_CC_STDC. * fcpwrap.c: New file, written by Andreas Sigfridsson. Added copyright header, fixed include files, and removed an unused variable. * AUTHORS: Added Andreas Sigfridsson. 1999-02-14 Per Cederqvist <ceder@lysator.liu.se> * Release 0.3. Release work. * NEWS: Updated for release 0.3. * README: Shorten the file. Refer to fsh.info. The web page now exists. * configure.in: Always answer the trampoline question. Release 0.3. * bootstrap.sh: Don't bother removing automake-generated files here. Remove them in mkrel.sh instead. * mkrel.sh: Release maker. * RELEASING: New file with a release checklist. * README.DEVO: New file with information for developers. Implement --help as an alias for -h. * infshd.py (usage): --help is an alias for -h. (main): Likewise. * fshd.py (usage): --help is an alias for -h. (main): Likewise. * fsh.py (usage): Document -h and --help. (main): --help is an alias for -h. 1999-02-13 Per Cederqvist <ceder@gratia> Improve the documentation. * README (Known problems): New section. Implement "-h" in all programs. Implment "-V" and "--version" in in.fshd. * infshd.py: (usage): New function. (main): Understand "-h", "-V" and "--version". Give an error message if any other arguments are given. * fshd.py: (usage): New function. (main): Understand "-h". * fsh.py: (usage): New function. (main): Understand "-h". 1999-02-08 Per Cederqvist <ceder@gratia> Implemented -V and --version. * Makefile.am (pkgdata_DATA): Added fshversion.py. (BUILT_SOURCES): Added fshversion.py. (fshversion.py): New target. * fshlib.py (print_version): New function. * fshd.py (main): Added -V and --version. * fsh.py (main): Added -V and --version. Added /bin/sh trampoline support. * configure.in: New argument: --enable-trampoline. * trampoline: New file. * simple: New file. * Makefile.am (PYTHON_SCRIPT_TEMPLATE): New configure variable. (EXTRA_DIST): Added simple and trampoline. (starter): New target, built from simple or trampoline depending on the value of PYTHON_SCRIPT_TEMPLATE. (fsh): Prepend starter to the result. (fshd): Likewise. (in.fshd): Likewise. * fsh.in: Removed the script-staring part. * fshd.in: Likewise. * in.fshd.in: Likewise. 1999-01-29 Per Cederqvist <ceder@signum.se> Jot down ideas for the future. * TODO: New file. 1999-01-28 Per Cederqvist <ceder@gratia> Fixed typo. * fshlib.py (parse_line): Fixed syntax error. (hollerith): Don't needlessly convert strings to strings. 1999-01-28 Per Cederqvist <ceder@lysator.liu.se> Fixed a bug that caused data corruption. * fshlib.py (cursor.extract): Fixed a bug, that under some circumstances could cause too little data to be returned. 1999-01-26 Per Cederqvist <ceder@signum.se> Remote tunnel startup failed the first time. * fsh.py (remote.__init__): Connection attempts that fails with ENOENT are now treated the same way as an ECONNREFUSED errors: start a new fshd. 1999-01-25 Per Cederqvist <ceder@gratia> Wait longer in select. * infshd.py (session.select_action): Typo fixed. (infshd.toploop): Trim the select timeout. * fshd.py (fshd.toploop): Trim the select timeout. * fsh.py (docmd): Trim the select timeout. Start fshd automatically from fsh. * fsh.py (remote.__init__): Start a corresponding fshd if needed. (docmd): Pass the use_l_flag down to remote.__init__. (main): Pass use_l_flag to docmd if the -l flag was given. * fshd.py (background): New function. (main): Call background if the -b flag is given. * fsh.texi: Remote all traces of the nonexisting index. (Introduction): Rephrased. (Invoking fshd): Document -b. Some minor improvements. (Invoking fsh): More documentation. Mention that fshd is started automatically if needed. (Remote protocol): Include a sample session. Document the basic syntax. 1999-01-24 Per Cederqvist <ceder@gratia> Use a write function that uses a list of strings as its write buffer. Use such a queue structure for all data that is written. * fshlib.py (write): New function. * infshd.py (class session): The stdin_queue is now a list of strings. All users updated. (session.select_action): Use fshlib.write to simplify code. * fshd.py (class remote): The send_queue member is now a list of strings. All users updated. (remote.select_action): Use fshlib.write to simplify code. (class client): The send_queue member is now a list of strings. All users updated. (client.select_action): Use fshlib.write to simplify code. * fsh.py (class remote): The send_queue member is now a list of strings. All users updated. (remote.select_action): Use fshlib.write to simplify code. (class local_side): The stdout_queue and stderr_queue members are now lists of strings. All users updated. (local_side.select_action): Use fshlib.write to simplify code. Use a read function that uses a list of strings to store what it has read. Use such a queue structure for all data that is read. * fshlib.py: Documentation added. (parse_line): New API: expect a list of strings instead of a single string. Remove the parsed data from the list. (read): New function. (cursor_eof): New exception class. (cursor): New class. * infshd.py (session.select_action): Use fshlib.read to simplify code. (class infshd): The commands member is now a list of strings. All users updated. (infshd.do_one_command): Adapted to new API of fshlib.parse_line. * fshd.py (class remote): The receive_queue member is now a list of strings. All users updated. (remote.select_action): Use fshlib.read to simplify code. (remote.poll_response): Adapted to new API of fshlib.parse_line. (class client): The receive_queue member is now a list of strings. All users updated. (client.select_action): Use fshlib.read to simplify code. (client.poll_command): Adapted to new API of fshlib.parse_line. * fsh.py (class remote): The receive_queue member is now a list of strings. All users updated. (remote.select_action): Use fshlib.read to simplify code. (remote.poll_response): Adapted to new API of fshlib.parse_line. (local_side.select_action): Use fshlib.read to simplify code. 1999-01-23 Per Cederqvist <ceder@gratia> Handle unexpected tunnel shutdown. * fsh.py (remote.__init__): Clear eos_seen. (remote.poll_response): Handle half commands on unexpected tunnel shutdown. Handle eos_seen. (eof_seen): Removed. (remote.drained): Don't return true if there is anything in the receive-queue. (local_side.eof_stdout): Whitespace fix. (docmd): Handle unexpected tunnel shutdown. Use non-blocking I/O, don't just prepare the code for it. * fshlib.py (set_nonblocking): New function. * infshd.py (session.__init__): Set the file descriptors non-blocking. * fshd.py (remote.__init__): Set the file descriptors non-blocking. (fshd.__init__): Set the socket nonblocking. (fshd.toploop): Set the client sockets nonblocking. * fsh.py (remote.__init__): Set the socket non-blocking. (local_side.__init__): Set the file descriptors non-blocking. 1999-01-21 Per Cederqvist <ceder@gratia> * Release 0.2. * README: Mention fsh.info. * configure.in: Version 0.2. * NEWS: Updated. Make fshd exit when the connection dies. * fshd.py (fshd.toploop): Exit when the connection to the remote system disappears. Support the "-l login" flag. * THANKS: Acknowledge David Konerding. * fsh.texi (Invoking fshd): Document the -l flag. Remove the phrase "For this to work you must have the same username on the local and remote -system." (Invoking fsh): Document the -l flag. * fshd.py (remote.__init__): New argument to the constructor: login. All callers updated. Pass "-l" to the underlying remote command execution command if the login argument is non-zero. (remote.select_action): Print a better message when the tunnel is closed. (remote.is_closed): New method. (client.is_drained): New method. (remote.__init__): New arguments to the constructor: login and use_l_flag. All callers updated. Use login as part of the AF_UNIX socket name. (main): Use getopt. Handle the "-l login" flag. * fsh.py (remote.__init__): New argument to the constructor: login. Use it as part of the AF_UNIX socket name. All callers updated. (docmd): New argument: login. All callers updated. (main): Use getopt. Handle the "-l login" flag. 1999-01-20 Per Cederqvist <ceder@signum.se> * Release 0.1. Make a release. * THANKS: Updated. * NEWS: Updated. * AUTHORS: Updated. * fsh.py: Copyright statement added. * fshd.py: Copyright statement added. * fshlib.py: Copyright statement added. * infshd.py: Copyright statement added. * README: Added contact information. * fsh.texi (Invoking fshd): New chapter. (Invoking fsh): New chapter. (Using with CVS): New chapter. (Concept index): Removed. (Local protocol): New chapter. 1999-01-20 Per Cederqvist <ceder@gratia> Make this a proper distribution. * Makefile.am (pkgdata_DATA): New variable. (EXTRA_DIST): New variable. Create the three user-level programs. These were actually used to make the commits of today. * in.fshd.in: New file. * fshd.in: New file. * fsh.in: New file. * Makefile.am (bin_SCRIPTS): New variable. (fsh): New target. (fshd): New target. (fshd): New target. Fix minor errors. * infshd.py (session.__init__): Typo fixed. * fshlib.py (QUOTA): Set it to 128 KB, as the protocol specifies. (parse_line): Handle session-less data-less commands properly. * fsh.py (remote.select_action): Fixed typo. (local_side): New name for former class local. (local_side.__init__): Initialize stdout_pending_close and stderr_pending_close. (local_side.eof_stdout): Close immediately if there is no pending output. (local_side.eof_stderr): Likewise. (docmd): New name for former main. Typo fixed. (main): New function. Parse command line arguments. Make fshd usable. * fshd.py (remote.__init__): Expect in.fshd to be found in the users path. (remote.poll_response): Print a greeting when the connection is established. (client.__init__): Initialize pending_close. (client.select_action): Handle pending_close. (client.send): New method. (client.close): New delayed method. (client.is_closed): New method. (next_session): Removed. (fshd.__init__): Don't fail if the AF_UNIX socket doesn't exist. (fshd.toploop): Reuse session numbers. Forward responses from in.fshd to fsh. Print a message when a session is opened, closed and when the initial command is transmitted. (main): Parse command line arguments. Documentation fix. * fsh.texi (remote protocol): Removed the core-dumped flag. 1999-01-19 Per Cederqvist <ceder@signum.se> Start to implement fsh. * fshlib.py (parse_line): New argument: want_session. * fsh.py: New file. fshd: Listen for clients and forward their requests to the server. * fshd.py: (remote.poll_response): Added the want_session argument to fshlib.parse_line. (client): New class. (next_session): New global variable (ugh!). (fshd.__init__): Create an AF_UNIX socket. (fshd.toploop): Listen to the AF_UNIX socket and create new clients as needed. Forward commands from the client to in.fshd. The code does not yet forward commands from in.fshd to the client. Implement flow control. * infshd.py (session.__init__): Set flow control variables. (session.select_action): Handle flow control. (session.select_set): Handle flow control. (session.stdout_flow): New method. (session.stderr_flow): New method. (infshd.stdout_flow): New method. (infshd.stderr_flow): New method. (infshd.parse_table): Added stdout-flow and stderr-flow. (infshd.do_one_command): Added the want_session argument to fshlib.parse_line. * fshlib.py (QUOTA): New constant. 1999-01-19 Per Cederqvist <ceder@gratia> Solve the flow control problem. * fsh.texi (flow control): New important section. 1999-01-18 Per Cederqvist <ceder@signum.se> Start to implement fshd. This can connect to in.fshd, but not actually *do* anything. * fshd.py: New file. Bug fixes to in.fshd. * infshd.py: (session.__init__): Set stdin_pending_close to 0. (session.select_action): Close stdin of the child if stdin_pending_close is true and the output queue became empty. (session.wait_poll): Hollerith-encode the exit status. (session.eof_stdin): Delay the close if there is pending data. (session.eos): Force the close even if there is pending data. (infshd.toploop): Flush output to the client before entering select. (infshd.do_one_command): Use fshlib.parse_line to simplify code. (main): New function. * fshlib.py: New file. Extract parse_line from infshd.py. 1999-01-17 Per Cederqvist <ceder@gratia> Implement the internals of in.fshd. * AUTHORS: First shot. * Makefile.am: First shot. * NEWS: First shot. * README: First shot. * THANKS: First shot. * bootstrap.sh: First shot. * configure.in: First shot. * fsh.texi: First shot. * infshd.py: First shot. Actually seems to work, at least a little. * The fsh project started.