Initial revision

This commit is contained in:
hsn 2003-09-10 09:57:34 +00:00
parent c8ff308ada
commit 5d372096c9
5 changed files with 2046 additions and 0 deletions

160
INFO Normal file
View File

@ -0,0 +1,160 @@
Interested parties about FSP please email
to Radim Kolar
hsn at cybermail.net
visit our homepage on
http://fsp.sourceforge.net/
and join us!
For more than 7 years benefits of FSP protocol were unnoticed
and FSP software was not maintained...
FSP today
Written by Radim Kolar
FSP uses UDP datagrams and it is reliable even when there is high
number of packet loss. It is usable on WiFi network with 60% packet
loss.
Unlike TCP, FSP has a fast restart when line comes up.
FSP server do not sends any data out unless is asked for. This
solves problem with transfering duplicate data when using
TCP protocol on overloaded lines. About 30% are dupes, thrown
out by client.
UDP ports are not often port scanned today. Nobody notice that
you are running a server.
FSP uses UDP which is unnoticed by many firewalls. FSP server
runs on 21 port by default, if you move it to port 53 (dns)
even strictly configured firewall can be worked around.
You want to run anonymous archive and want to keep lamers out.
You want to share something without ruining your valueable bandwidth.
You have overloaded archive site.
You do want to share large data files (movies, ISO images) on
slow (or you do not want to waste valuable bandwidth) lines.
Ideal for sharing files on modem lines.
FSP daemon is a very light server.
What is the purpose of FSP (V2.8.1):
Written by A.J.Doherty@reading.ac.uk
FSP is a set of programs that implements a public-access archive
similar to an anonymous-FTP archive. It is not meant to be a
replacement for FTP; it is only meant to do what anonymous-FTP
does, but in a manner more acceptable to the provider of the
service and more friendly to the clients.
Providing anonymous-FTP service can be costly --- each active
session consumes one process slot in the OS and one stream socket
entry in the network sub-system. The servers can also run
concurrently, adding to the system load. A popular archive site
can easily be overwhelmed as a result. Some were forced to
shutdown and some impose inconvenient access restrictions.
Unlike FTP, FSP is connection-less and virtually state-less. One
server handles requests from all clients machines. Each active
client machine takes up 16-bytes in a dynamically extensible
table. Since only one server exists on a server machine at any
time, the load added to the server machine is no more than one.
In exchange for allowing site operators to keep their sites open
and do away with cumbersome access restrictions, this is what the
clients accept with FSP:
1) Lower transfer rate. The maximum rate is 1 kbyte per UDP
message round-trip time between the client and the server.
In addition to the potential for more abundant sites and more
accessible sites, this is what the clients gain with FSP:
1) Robustness. Since FSP is connectionless, fluctuations in
the network will not abort a FSP transaction. Furthermore,
the 16-bytes of data for each client can be regenerated at
any point during any transaction. Thus, if the server goes
down at any point during a transaction, the transaction will
resume when the server is restarted. (like NFS)
2) Friendlier user interface. FSP does not have its own command
interpretor like FTP. Since it is connectionless, there is
no reason to carry much information from one command to the
next, and the commands can all be made into individual Unix
programs. For instance, there is one program you run to list
the directory and another you run to download a file.
3) Client protection. FSP oversees a directory structure similar
to that of an anonymous-FTP. However, a directory created
via FSP transaction is owned by the client machine that issued
the creation request. The client can create and delete files
and subdirectories in that directory. In addition, the client
can enable any of the four attributes for that directory:
A) Give all other clients the permission to create files.
B) Give all other clients the permission to delete files
or subdirectories.
C) Give all other clients the permission to read files.
(this is true by default)
D) Give all other clients the permission to create sub-
directories.
Note: A subdirectory can be deleted if it is empty and the
client owns the subdirectory.
4) Server protection. FSP server does not spawn sub-programs.
It will accept only paths that are downward relative to its
designated working directory. On systems with symbolic links,
the server will follow symbolic links, but it does not follow
uplinks (".."). Clients cannot create symbolic links and
care should be taken so that other users on the server machine
cannot create symbolic links in the server's work space.
It is also fairly difficult to formulate an attack to force a
shutdown of a FSP site by actions of a rogue site. About the
only way to disrupt a FSP service is to flood the FSP site
with network packets. FSP server prevents itself from
'counter-flooding' by filtering for legitimate requests using
the following method:
A) Each request message contains a key. For each client,
server database contains the keys to be used for the
next client request and for the previous client request.
B) If the next request does not contain a key that matches
either of the two keys, it is accepted only if at least
one minute has elapsed since the last time a request
is accepted. If the key does match the old key
(retransmit by client) it is accepted if the elapse time
is greater than 3 seconds.
C) Every request message accepted is acknowledged with
one reply message. The reply message contains a new
key to used for the next request. The new key is
computed by the server with a pseudo-random number
generator.
Flooding is a blatant violation of network etiquette because
a site can be subjected to flooding attack whether it has FSP
running or not, and flooding congests every link and gateway
between the rogue client and the server. As a further measure
of protection, the server loads a table of rogue clients on
startup. The server will not respond to requests from any of
those clients.
***********************************************************************
This is a free software. Be creative; make your own macros and tools
and let me know of any bugs and suggestions.
***********************************************************************
Source code uses several BSD-like licenses; Whole FSP is distributed
under 2-point BSD license, also known as MIT X11 License.

162
INSTALL Normal file
View File

@ -0,0 +1,162 @@
Compilation:
The first step in running this fine software (:) is to get it to
compile. Every effort on my part will be made to make this code
compile and run on any reasonable system. The information in this
file CURRENTLY pertains only to Unix and Cygwin users.
The first step is to run the configure script provided in this
directory. This will generate a good makefile and a file called
tweak.h in the include directory. These files are vital for the
compilation of the system.
You must also edit the files include/client_conf.h and
include server_conf.h as they contain parameters which must
still at this point be manually set by the person compiling
the code.
>> By default, the configure script will set up the Makefile
>> to install the code in /usr/local/bin and the man pages under
>> /usr/local/man. If you wish to change this, you MUST run
>> configure with the --prefix option. For instance, on my
>> machine, I install the files under /usr/jt/bin and /usr/jt/man.
>> To do this, I type configure --prefix=/usr/jt
At this point, you should just be able to type 'make'
and then 'make install'. This will compile and (if
you do an install) install the clients in the directory specified
by you in the Makefile. You may also wish to type
'make install-man' if you wish to install the manual pages.
If you get ANY errors or warnings while compiling this code
(excepting warnings about the function signal), please send
me email with a complete copy of the output of make as well as
a copy of the config.h file.
IMPORTANT NOTE: You do not need to run the fspd process if you only
wish to access existing fsp archives. FSPD is only needed if you
wish to set up and maintain a new archive for use.
Client utilities:
All inter-command states are kept in these three shell environment
variables.
FSP_PORT Port number of the fspd you wish to contact.
FSP_HOST Host name or number of the fspd.
FSP_DIR Your current working directory in the archive.
When multiple client utilities are run at the same time on the
same client machine, packet multiplexing mechanisms can be used
to enable concurrent access to the same fsp database. If none
of the mechanisms are selected at compile time, FSP_LOCALPORT
can be used to ensure that only once client utility can run at
any time. In this case, FSP_LOCALPORT can be set to any port
number not current used on the client machine.
FSP_TRACE can be set if you want status reports be printed while
files are being transferred.
FSP_DELAY variable can be used to set the retransmit interval for
client utilities (in thousandth of a second). The retransmit rate
is adjusted in an exponential manner, until the retry rate reaches
5 minutes per retry. This delay cannot be set below 250 usecs.
FSP_BUF_SIZE can be set to a positive number less than or equal
to 1024. When set, it determines the size of data to be send for
each request during file and directory information transfer. The
default is 1024. Some sites are connected via links that cannot
transmit buffers containing 1024 bytes of data in addition to the
header information. Setting FSP_BUF_SIZE to a lower value will
allow these sites to access fsp archives.
FSP_LOCAL_DIR can be set to a local working directory from/to which
all data will be transferred.
Server Administration:
The only things you need for setting up a FSP server is a work
directory for the service the FSP server itself (fspd) and
an fspd.conf file in the place you specified in include/server_conf.h.
To create an fspd.conf file, copy the example.conf file
provided to the correct place and edit to suit your tastes.
fspd can run independently or it can be run under inetd. When
running independently, fspd waits for messages through a UDP
socket whoes port number is defined in the fspd.conf file.
When runing under inetd, fspd is invoked as in.fspd. Inetd will
spawn fspd when a message arrives for the FSP socket. The fspd
process will take over and stick around to wait on additional
messages. After 2 minutes pass with no messages, fspd will exit
and return control to inted.
Sample setup for inetd operation:
In /etc/services file:
fsp 21/udp fspd
In /etc/inetd.conf file:
fsp dgram udp wait ftp /usr/etc/fspd in.fspd
In this sample, the same port number for ftp is used for the
fsp socket. There will not be a conflict because ftp uses
stream protocol, and fsp uses UDP protocol. The fspd program
in this example is ran under user 'ftp'.
Many other options controlling the behavior of fspd can be set in
the fspd.conf file. Please read the comments in the fspd.conf
file for details.
FSPD provides directory security through a series of . files created
in the directories serviced by fspd. These files are invisible to
the clients, and can (mostly) be changed via the fprocmd client
utility (or by the server administrator manually). The only file
that can not be changed in this manner is the ownership of a
directory. The files and their meanings are:
.OWN.XXXXXXXX specifies that the machine whose IP number is
encoded as XXXXXXXX owns the directory. The owner
of a directory automatically has all other rights to
a directory and is the only one that can change the
other protections. It is created when a directory
is initially created in the archive via fmkdir.
.FSP_OK_DEL Grants any client the permission to delete any file
from the current directory.
.FSP_OK_ADD Grants any client the permission to add new files to the current directory.
.FSP_OK_MKDIR Grants any client the permission to create new sub-
directories under the current directory owned by
the client creating the directory.
.FSP_PRIVATE If this file exists, only the owner of the directory
is allowed to read the contents of the files in the
directory. Subdirectories of this directory will
inherit the privacy protection.
Clients do not get to read the directory information directly.
Instead, fspd maintains a directory listing for each directory
in a cache file. If the directory is writable by fspd, or if a
writable file in it is prepared beforehand, fspd will store the
directory information in .FSP_CONTENT file in that directory.
Otherwise, it will store the information in a pair of files (with
hashed names) in a special directory specified in the fspd.conf
file. The latter allows read-only directories to be exported.
When a client requests information for a directory, the cache
file is created if it doesn't exist, and it is rebuilt if it is
out of date. The information is accessed by having the client
read the directory listing file. Care is taken so that the client
will not get corrupted entries when the directory is changed while
the listing is being read.
Files being uploaded are first written to a temporary file in the
work directory: .TXXXXXXXXYYYY where XXXXXXXX is the inet number
of the client, and YYYY is the port number of the client program.
When upload is compelete, the file is moved into the intended
location.
Sending it an 'alarm' signal will cause fspd to dump its current
client database into the file .HTAB_DUMP in the work directory.
This can be useful for debugging and for catching rogue clients.

12
MACHINES Normal file
View File

@ -0,0 +1,12 @@
This is a list of machines and architectures under which this code has been
successfully compiled out of the box using configure script. If you get it to
compile on an architecture/compiler combination other than one listed here,
PLEASE SEND ME DETAILS of the fsp version, the type of machine, the OS, the
compiler used and C library used; As well as what changes (if any) were needed
to for a clean compile. My email address is hsn/at/cybermail.net. Thanks
for your cooperation.
FSP Version CPU OS Compiler C library
--------------------------------------------------------------------------
2.8.1 Beta 5 i386 Linux 2.4 GCC-3.2 GLIBC 2.3.1
2.8.1 Beta 10 i386 Linux 2.4 GCC-2.95 GLIBC 2.3.1

606
doc/HISTORY Normal file
View File

@ -0,0 +1,606 @@
------------------------------------------------------------------------------
A.J.Doherty
Version 2.8.1b3 -- March 14, 1996
1) Fixed host file configuration problem properly. Problems with
regard to differences between big and little endian machines
are now sorted out.
2) Fully fixed symbolic link issues with regard to security. FSPD
now jumps to directories and verifies that they do lie within
the defined FSPD directory tree. Symbolic links to root will
end up leading to the base of the directory tree and ../../..
type links will be revised to lie within the tree, they might
not always be valid however (particularly for sites which
are mirroring someone elses filesystem) in which case they fail
and the "directory not found" message will be returned.
3) FILES file brought up to date.
4) As suggested by J.H.M.Dassen the default server fspd.conf file
will now be looked for under /etc/fspd.conf when running on
Linux systems. Also on Linux systems the user configuration file
will now be searched for under /usr/etc/fsp_prof this should
conform with the "approved" Linux Filesystem Structure.
5) Added a TODO file so people have some idea of what is forthcoming.
Version 2.8.1b2 -- March 4, 1996
1) Amendments to the manuals to make them more accurate and/or
clearer.
2) Amendments to the example.conf example FSPD configuration file.
This ought to make it clearer what the options are and what they
do (thanks to Darren VanWageningen for pointing out this need).
3) Use of the ./configure --prefix=/dir/name feature is now possible.
FSP will be installed into /usr/local by default or into the prefix
directory if one is specified.
4) FSPD should now trap symbolic links that go outside of the root
of the FSP directory tree. Symbolic links that point to / are
redirected to the FSP root directory, all others are flagged and
ignored.
Version 2.8.1b1 -- January 17, 1996
1) Fixed problem with fspd exiting if it has execute permission
to a directory but no read permission and client asks for dir
listing. It now returns "No such file..." (server/file.c)
(thanks to Dimitri Ars for pointing this out)
2) Fixed configure.in script problem for Dynix Systems (thanks to
Laurent Montaron for pointing this out).
3) Fixed configure.in to check for limits.h, so that distribution
builds cleanly on IRIX based machines.
4) Idle delay maximum size reduced from 5 minutes to 3 minutes
5) Idle delay increased more gently increases by 50% each time
rather than doubling each increment
6) Server will flag unsupported commands (> 0x7f) and send back
a message saying it only supports protocol revisions 2.8.1
and below. This prevents it from silently ignoring ver 2.9.0
and above clients.
7) Amendment in clients/fver.c to get around problem which was
cropping up on big endian (Sun/Solaris) machines.
8) Fixed some more typos and spelling errors in the documentation.
Version 2.8.0b2 -- October 31, 1995
1) Fixed reversed IPs (for restricted hosts) in server/host.c
Thanks to Tanel Pronto Raja for pointing out I'd missed it.
Version 2.8.0b1 -- June 22, 1995
1) Changed default optimization to -O
2) Changes to allow compilation on Linux
changed d_reclen to d_rcdlen in include/util.h
changed d_reclen to d_rcdlen in client/util.c
3) Heavy revision of the configure.in template and regeneration
of the configure shell script using GNU Autoconf v.2.4
4) Modification of the INFO file
5) Changed client/lock.c:210 "proj" field now fits into a byte
6) Modified adaptive timeout client/lib.c
7) Added "/n" to server/host.c:210 (thanks to Jason Duerstock)
8) Fixed Typo in include/tweak.h.in:31 (thanks to Chad Larson)
9) Changes to allow build on Interactive Unix 4.0 (thanks to Chad
Larson)
10) Documentation fixes (thanks to Chad Larson)
11) Removed redundant quotes in setup:16 (thanks to Chad Larson)
12) Fixed malloc fault in clients/fhostcmd.c:70 (thanks to Chad Larson)
13) Changes to allow clean configure and build on Solaris 2.x
14) Tweaked server/file.c to fix README problem. It will now only accept
up to 1022 bytes of a directory .README file to prevent packet
overflow problems.
15) Reorganised ChangeLog order so you can see the latest differences.
16) Keyed all fopen(s) in server/file.c with "b" (binary mode) to allow
easier porting of the server to non-UNIX platforms (thanks to Ray
Garcia).
17) Lots and lots of tidying up of the source code - amount of output
generated by compiling by -Wall has about halved. Still plenty to
go yet though.
Version 2.7.1 -- May 7, 1993
1) Ironed out portability problems.
2) Fixed the pointer to in cast in server/filecache.c (thanks
to wen-king)
3) Added WenKing's patches for the Dec Alpha
4) Merged in Sven's patches for fixing 2.7.0 on a VMS system.
5) Added aclocal.m4 with some macros to start cleaning up the
configure.in file a bit. Some macros needed changing to
get the configure script to configure properly on a linux.
6) Fixed a bug in server_upload where a file could not be
uploaded unless the server had a valid cache dir set.
Thus, any sites that didn't use cache dirs couldn't have
files uploaded.
Version 2.7.0 -- May 3, 1993
1) reorganized source code completely.
2) Installed the source code under Gnu autoconf
3) Added ffind client submitted by Michael Meskes.
4) Rewrote portions of the documentation.
5) Moved all configuration out of the Makefile and
into header files and an fspd.conf file
6) Added -r recursive option to fgetcmd and fcatcmd
(thanks to Michael Meskes). Read man pages for details.
Version 2.6.6.5 -- Apr 19, 1993
1) Fixed a bug in the .IPHOST code. (Thanks Laurent and Phil)
2) Fixed a few typos and compile problems with the merged
client. (Thanks to the numerous people who reported it)
3) Changed the code for fducmd slightly (Thanks Michael Meskes)
(NOTE: Michael has also written an ffindcmd that will be in
the next release, it's not included here)
Version 2.6.6.4 -- Apr 13, 1993
1) Fixed yet another small bug with readme files that I'd
created.
2) Encased all printing of strings recieved from a remote
site inside some sanity to prevent them sending a %s or
something as part of a string and having it choke.
3) A core dump in the logging code where there was a case
under which it did not return after an error is fixed
Version 2.6.6.3 -- Apr 12, 1993
1) Added bitfields containing the version and protection
information into the getpro and fver commands. Newer
clients should rely on that information and thus be able
to present it in any display format desired.
2) Logging code will now stat the logfile and if it's no
longer there, it will recreate it after closing the old
fd. This saves the system expense of opening and closing
a logfile each time we log something, and still allows the
deletion of logfiles during a run.
3) Modified clients to present information from the bitfields
for ver and pro, and modified the server to give only
minimal textual information for ver and pro.
4) Added a sanity check to FSP_DELAY variable to never let
it go below some specified minimum value. This minimum
value is set in common_def.h and defaults to 500 usec.
500 usec should remove the problem of the infinite resend
client.
5) Fixed a small bug in logging where it would add one newline
for every 1k uploaded to the logfile.
Version 2.6.6.2 -- Apr 8, 1993
1) Added patches to make the client_timeout value be settable
via an environment value. Default timeout value is 4. The
change has no effect unless you compile the clients to time
out if there is no response. (patches by Michael Meskes)
2) Added fducmd and fsethostcmd written by Michael Meskes.
fducmd is a standalone (or merge) version of the du cmd
that phil put into his fspclient. Fsethostcmd supports
a fairly simple resource file for setting up hosts and
local directories and all environment variables based on
information in a file.
3) Fixed a bug in fgrab that caused you to not be able to
grab a file even though you could get it and then rm it.
4) Fixed the IPHOST code. It was returning automatic vars
up the stack, and assuming that assigning a structure
to a structure performed copy. This is not always the
case, and when compiled under ultrix cc this assumption
broke. The fix was to malloc the structures down and
pass pointers up the stack initially, and then store
those pointers. The code has been tested now as well,
and verified to work on at least my system.
5) The server will now log an 'Unknown command.' error
if it gets a command request that it doesn't know how
to handle, and will return this string to the requesting
client. (requested by Robert Martin-Legene)
6) Fixed a bug in build_dir() reported by Phil Richards.
A file could get a garbaged 'long_name'.
7) Added better logging code supplied by Phil Richards.
8) Added reverse hostname lookup and read only mods supplied
by Phil Richards.
9) Removed a bug that caused logging to be turned on even when
the -l option wasn't specified.
10) Changed the name of the fsethostcmd to fhostcmd so that
POSIX machine nameing conventions were followed.
11) Renamed the .fsprc file used by fhostcmd to .fsp_prof
Version 2.6.6.1 -- Mar 11, 1993
1) Reduced the client timeout from 5 to 4.
2) Made client timeout code default in the makefile.
3) Made printing of 'E' on retrys conditional on
trace being true.
4) Shortened temp file names so that they will always
fit under 14 character limit.
5) Yet more small fixes from Sven to make 2.6.6 compile on
VMS cleanly. (thanks Sven)
6) .README file support thanks to Pihl
(phil.richards@prg.oxford.ac.uk)
7) More advanced Hostname security thanks to Phil as well.
(Look in the INFO file for details)
8) Rewrote logging to use varargs based on ideas from Phil.
9) If no password is supplied, and the .OWN.XXXXXXXX file is
empty, then you will still be able to read the directory.
This reinstitutes backward compatability in the server with
older clients that cannot send passwords.
10) Changes to support a local working directory for all remote
operations courtesy of Michael Meskes
<meskes@ulysses.informatik.rwth-aachen.de>
Version 2.6.6 -- Mar 10, 1993
1) Added some patches supplied by Sven Pechlar to fix a few
last niggling bugs with the VMS port.
2) File sizes are now logged as part of GET_FILE (courtesy
of Sven). This might make the Sumalog script useless until
fixed.
3) Added an append mode to fgetcmd and fgrabcmd. Under this
mode, fget/fgrab will try to append data to the end of a
short file. This patch was submitted by robert@diku.dk
(Robert Martin-Legene)
4) Extended the timeout time on CLIENT_TIMEOUT as requested.
5) Added code supplied by Sven Pechlar to do password protect
on private directories, and to do internal file cacheing.
The password protect code looks extremely broken to me.
But I added it anyway as if no passwds are set, it
shouldn't break anything.
6) Signal handling code (for BSD only) to handle cleaning up
.fsptemp.XXXX files on abort (courtesy of AEJFellows)
7) Move setuid call before log file is opened. (AEJFellows)
8) Added throughput control courtesy of Laurent Montaron
(montaron@eurecom.fr). See INFO file for details.
Version 2.6.5jt.7 -- Feb 9, 1993
1) Fixed some of the POSIX compliant naming that I missed the
first time around.
Version 2.6.5jt.6 -- Feb 8, 1993
1) Added a contrib directory for user submitted programs such
as my admin scripts. Currently thats the only thing here
but I'm sure other things will wind up here in time.
2) Removed the redirecting of stdin/stdout/stderr to /dev/null
under normal operation because it was causing some true
error conditions (like it telling you that homedir didn't
begin with a / to get dumped into the bit bucket.)
3) Fixed a logic error in the priveledged site code. sheesh.
NOTE: To a disallowed client, it will appear as if the
server doesn't exist. This is as far as I can tell the
behavior intended by Wen.
4) Modified makefile to not use any file names longer than
14 characters (POSIX compliant). This only affected the
merge programs.
Version 2.6.5jt.5 -- Feb 4, 1993
1) Added extended version information and loggin information
to the reply from the fver command.
2) Changed the message type on fver replies to CC_VERSION
instead of CC_ERR. This just makes more sense.
3) One more special case where SCO unix seems to require
a certain order in it's include files.. sheesh.
4) Changed duplicate variable clobbertype in both fgetcmd.c
and fgrabcmd.c to be unique. Moved the #defines of
the clobbertypes into the appropriate .h file
5) Added a few more small fixes from Sven.
6) Added support for restricted mode. When server is run
in restricted mode ONLY users from sites appearing in
the .ROGUE_HOSTS file can connect. This flag basically
reverses the meaning of the .ROGUE_HOSTS file, but by
doing so provides a cheap way of doing priveledged connect.
Version 2.6.5jt.4 -- Feb 2, 1993
1) Made the initial check for logfile opening be done
with mode "a" instead of mode "w+" so that it didn't
erase the file every time through.
2) Reordered the includes in common_def.h so that they
preserved the original 2.6.5 ordering which some machine
types seemed dependant on.
3) Added in Sven's repatches to make VMS compilation work.
Version 2.6.5jt.3 -- Jan 27, 1993
1) Added in the Enhanced Trace (cps) from pi@cs.sun.ac.za
2) Added protection from clobbering files on fget/fgrab
courtesy of A.E.J.Fellows (A.E.J.Fellows@bham.ac.uk)
3) Various updates and corrections to the man pages.
4) Merged in VMS changes. .com files and VMS makefiles
as well as VMS changes files all exist in ./vms.
VMS specific sourcefiles are in ./vms_src and VMS
specific header files are in ./vms_h. VMS changes
done by S.A.Pechler@bdk.tue.nl. All changes made
by Sven are in ./vms/VMS.ChangeLog. Some of the
changes he made there are incorporated into the
unix version as well.
Version 2.6.5jt.2 -- Dec 29, 1992
1) Fixed a core dump in any of the programs that used
file globbing. If you passed a ~ to the command
in this state, you would seg violate. Fixed by
removing the parsing of ~ in the glob.c file.
It now errors with an 'illegal character in path'.
Version 2.6.5jt.1 -- Dec 18, 1992
1) Changed the direction of intent on the .FSP_OK_READ
file and renamed it to .FSP_PRIVATE. Now prescense
of file means directory is private. Done so that
spurious files didn't need to be created everywhere
just to grant read access. In concordance with this,
the procmd is no {+-}p instead of {+-}r.
Version 2.6.5jt -- Dec 17, 1992
1) Added support for .FSP_OK_READ and .FSP_OK_MKDIR.
.FSP_OK_READ allows reading the contents of files.
.FSP_OK_MKDIR allows creation of subdirectories.
.FSP_OK_ADD no longer means anything for creation of
subdirectories, only for creation of files.
Version 2.6.4 -- Dec 12, 1992.
1) Make main makefile pass CC and CFLAGS definitions to
bsd_src's Makefile
2) Add util_cd2 to client_util and make bsd_src/ls.c use
it. This remove some of the spurious GET_DIR requests.
Also, there is a bug in client_util's util_cd routine
in that it always requests 1K worth of directory info
no matter what FSP_BUF_SIZE setting is used. Causeing
fsp clients to hang under situations where FSP_BUF_SIZE
is limited by the network (slip, usually).
3) function server_interrupt in server_lib.c was defined
to be of type void to avoid complaint from some compilers.
There are several other minor fixes in functin variable
declarations in several files for the same reason.
3.5) The retry delay function for the client is tweaked
somewhat.
Version 2.6.3 -- Sep 19, 1992
1) client_lock.c is modified to fix a compilation phase
bug that occur when NOLOCKING option is used in the
Makefile. This affects only the client code.
2) server_file.c is modified so that upload uses the
directory cache directory instead of the top directory.
This is needed for those sites that want the top
directory be write protected. (good for ftp sites).
4) A change in the server_up_load function in the file
server_file.c is made to fix a subtle bug. When a
file is uploaded, the offset to begin write was not
used to seek to end of file. Instead, the file is
only appended to. This cause error if two retry
messages in an upload was divided by a server going
down. The new server is fixed so that seek based
on the pos parameter is done. This eliminates the
possibility of such an error.
Version 2.6.2 -- Sep 2, 1992
1) bsd_src/cmp.c was changed so that flscmd can sort its
output by date correctly on all systems. This particular
version of the BSD source made assumptions about what
the comparison functions should return for the qsort
routine, but those assumptions were not true for all
systems.
Version 2.6.1 -- Aug 31, 1992
1) Small changes to Makefile. In 2.6, "make" will fail if
you needed to define LIB, or if your command shell is not
/bin/sh, and you want to merge client utilities. Version
2.6.1 fixed them. Only Makefile is changed, everything
else is identical to 2.6.
Version 2.6 -- July 6, 1992
1) client_lock.c is fixed so that perror is always
followed by exit. Previously, if System-V shared
memory mechanism is chosen for locking control in
the Makefile, but the mechansim has not in fact
been configured into the UNIX kernel, the client
utilities would die of a segmentation fault error.
The error message will now be more reasonable.
2) mechanism is added so FSP server can put directory
cache files in a special directory other than the one
for which the files are intended. Previously a
.FSP_CONTENT file is created in each directory the
fspd process controls. Through variables in the
Makefile, provider of fsp service can now elect to put
cache files together in one single directory, and put
a cap on the total number of such files that can exist
simultaneously. The fsp server will create a cache
file in the cache directory when it couldn't find one
already exist in the directory being listed by the
client. Changed are minor and invovles the routines
server_get_dir, server_get_dir_2 [new] in "server_file.c";
the variable declaration section of "server_main.c", and
Makefile.
3) a line in util_cd is changed, and a line in get_dir_blk
is added in the file "client_util.c" to prevent fls from
sending some spurious requests to the fsp server.
4) Makefile is changed to allow the option of combining all
client utilities into one actual binary files. This is
necessary for space saving reasons on some versions of
UNIX. The various small main C files for the utilities
had to be changed as well to accomodate this change.
5) fver now will take an optional argument. If none is
supplied, it prints the version string of the server.
If one is supplied, it prints the versioin string of
the client FSP software.
Version 2.5 -- April 8, 1992
1) A bug introduced during the last release --- fspd will
not timeout and exit when running under inetd mode.
This bug is now fixed. It was introduced because it
is more convienent at one time for it not to exit when
it is still being debugged. The patch to stop it from
exiting was not removed before release time.
2) A very rarely seen bug in some OS is circumvented. UDP
packet's headers contain a checksum field. If the
checksum option is disabled, the OS will set the
checksum field to 0 before sending, and will not check
the checksum field when message is received. If the
option is enabled, the OS will stuff the checksum into
the checksum field. When a packet is received, the
checksum field is checked. If the checksum field is 0,
then the OS assume that the sender does not have option
enabled, and therefore the checking is skipped.
Problem arises when a packet's computed checksum is
zero. Some OS will stuff 0xffff into the checksum
field before sending such a message to distinguish it
from the case for which checksum is disabled. Other
OS couldn't recognize 0xffff as an indication that the
actual checksum could be either 0 or 0xffff, and
subsequently reject the message. The client can thus
get stuck forever in retransmitting a request that
happens to have 0 for the computed checksum, but
0xffff for the checksum field.
To get around the problem, the sequence number field
of the request message (which has meaning only to the
client software), is partitioned such that 2 of the
bits reflect the retry sequence, and the remaining 14
bits reflect the request sequence. This will ensure
that if one request got ignored because it happens to
have a checksum of 0, the next retry will result in
a packet that does not have a checksum of 0. The only
file affected here is client_lib.c.
3) In response to those who have severely limited UDP
packet sizes, the environment variable FSP_BUF_SIZE
is supplied to set the data size of file and directory
information transfers. The default is 1024. You cannot
set it to be bigger than 1024, but you can set it to
be smaller if you find that your system cannot pass
UDP packets that includes 1024 bytes of data. This
requires changes both in the server and the client
code. The first parameter field of get-file and
get-directory requests contains the path of the file
or directory. The second parameter field was unused,
but it is now used to hold the number of bytes to read.
This change is backward compatible in the sense that
if the second field is empty (old client code), the
new server code will default to 1024. Changes to the
client code is confined to client_util.c.
Version 2.4 -- March 27, 1992
1) fgrab/fgrabcmd client utility is added. It is like
fget except it also deletes the named files in such a
way that if there are multiple fgrabs for the same
file, only one will succeed. One bug/mis-feature of
fgrab is that when fgrab is terminated abnormally, the
file is not restored. This command is useful for things
like sharing bone files for modified versions of nethack.
2) FSP now allows multiple client programs to run at the
same time if one of the three multiplexing mechanisms
are chosen during compile time. It is likely that at
least one of them will work for your system. The
multiplexing is done at the client side, and does not
allow the client machine to issue request messages at
a higher rate compared to the previous versions. The
FSP_LOCALPORT variable is no longer needed. However,
if used, it will force serialization of client programs,
which might be desireable if none of the multiplexing
mechanisms are suitable for your machine. In order to
accommodate this change, the server code has been
changed to store temporary upload files with a different
name from the previous version. The names now have to
identify sender's port as well as sender's internet id.
Change is necessary to keep it under 14-character limit
of some OS.
3) Progress report mechanism enabled by FSP_TRACE variable
now try to update the kbyte display more promptly.
4) fcat/fcatcmd will now turn off FSP_TRACE during its
file transfer if its stdout is a tty.
Version 2.3a -- March 20, 1992
1) In a few places, non-critical errors of the form:
if(errno = EINTR) ....
was made. It obviously should have been == instead.
The problem is fixed.
2) In the previous versions there is a potential problem
such that if the first reply packet is dropped or is
messed up, making a retransmit necessary, fspd will
make the client utility wait for a 1 minute timeout.
A potential loop hole for this happening has been
closed by modifying server_lib.c where the packet key
is checked.
Version 2.3 -- Mar 9, 92
1) The bsd_src/glob.c file has a bug in blkfree function
in that it tries to free something that is actually
on the stack of the glob function. The last call to
free has been commented out to fix the bug.
2) The fspd has a bug whoes only visible manifestation
is the that protection can't be changed. The fix has
required a moderate amount of code change in fspd.
3) .FSP_NO_DEL and .FSP_NO_ADD mechanism has been replaced
by .FSP_OK_DEL and .FSP_OK_ADD mechanism. Thus by
default, a directory is no delete and no add.
4) fprocmd is modified to relax option checking, allowing
arbitrary option characters be passed to the fsp server.
5) A fls bug is fixed so that a "fls /" in a directory other
than the root directory will not cause an error.
6) A -DDIRENT switch is added in Makefile to help support
those machines that does not have /usr/include/dirent.h.
Version 2.2 -- Feb 15, 92.
1) The fput and fgetcmd utilities will now accept a list of
files from its standward input. See their man pages for
this expanded usage. This is useful if you don't want
file names to show on 'ps' output.
2) The retransmit timer for client code has been changed
to use an adaptive algorithm. In pre-2.2 versions of
FSP, clients will retransmit if it has not received a
response from the server after a delay of 3 seconds.
In version-2.2, two separate delays are used. The
"busy" delay is used when waiting for a reply for the
first try and the second try. Any time a second try
is necessary, the delay is increased by 50%. Every
first try brings the delay 12.5% closer to the initial
delay setting (3 seconds by default, settable by the
FSP_DELAY variable). For the third try and beyond,
the "idle" delay is used. For each try, the delay is
doubled.
3) Makes available FSP request code space 0x80 - 0xff for
future user extensions. Each such extension will begin
with a code byte in that range, and followed by a control
block, which is likely to be different from the existing
one. The basic operations of FSP will not require the
use of such extensions.
Note: 2.2 does not involve changes to the server itself.
The server is been checked out and added to by a
few people on the net. I will wait until the
modifications stabilize before I consolidate them.
Version 2.1 -- Jan 1, 92.
1) The maximum length of a name in pre-2.1 server is
both limited by the 1k-byte udp packet size and, in
some cases more severely, by the OS it is running in.
On some systems, the OS imposes a limite of 14 chars.
For those systems, the server can now be made to hash
long names into short ones. The effect is transparent
to the clients except when two long names gets hashed
into the same value. In that case, they will refer
to the same file during downloading, and they will
displace each others during uploading.
2) Since directories, unlike files, have undisputable
ownership, removal of a directory owned by a client
should depends only on the ownership of the directory
itself, and not on that of its parent directory. In
pre-2.1 server, the client must have delete permission
to the parent directory before it is allowed to delete
the subdirectory. In 2.1, the permission is not needed.
Version 2.0 -- Dec 91. Added man pages. Server bug fix. In 1.0, files
in a directory that is protected from deletion can still
be written over. In 2.0, it is prohibited as well.
Version 1.0 -- Dec 91. Original source created.

1106
doc/faq.html Normal file

File diff suppressed because it is too large Load Diff