From daemon Thu Apr 15 15:48 PDT 1993
Received: from THIALFI.CS.CORNELL.EDU by dns1.eecs.wsu.edu (16.6/5.910402)
	id AA13516; Thu, 15 Apr 93 15:48:14 -0700
Received: from CLOYD.CS.CORNELL.EDU by thialfi.cs.cornell.edu (5.67/I-1.99D)
	id AA13808; Thu, 15 Apr 93 18:46:10 -0400
Received: by cloyd.cs.cornell.edu (5.67/I-1.99D)
	id AA02462; Thu, 15 Apr 93 18:43:33 -0400
Received: from taygeta.oc.nps.navy.mil by cloyd.cs.cornell.edu (5.67/I-1.99D)
	id AA02458; Thu, 15 Apr 93 18:43:28 -0400
Received: by taygeta.oc.nps.navy.mil (5.61/1.34)
	id AA03476; Thu, 15 Apr 93 15:42:27 -0700
From: skip@taygeta.oc.nps.navy.mil (Skip Carter)
Message-Id: <9304152242.AA03476@taygeta.oc.nps.navy.mil>
To: sstream@cs.cornell.edu
Subject: An example program using the sstream library
Date: Thu, 15 Apr 93 15:42:26 MST
Status: RO


	Here is the "readme" file for an application that is
	typical of my use of the sstream library.

	If you want a copy, just let me know,





	distribute V1.8 and distributed V1.6

	These programs were written in order to ease the distribution of
	source code from one system to another.


	distributed:

	This is the server program, that must be running on the system that is
	to receive the files.  This program has options for setting the socket
	port number and defining a runtime configuration file.

	distributed [-pport#] [-cconfig_file] [-llog_file]

	The port number is the socket that the server will listen to for
        connections from the client.  The client must know this port number in
        order to contact the server.

	The configuration file can contain any or all of the following information:
	A list of allowed users, a list of allowed remote sites, a list of
	directories for which writing is NOT allowed, and a file extension
	translation table.

	If the translation table is specified, then files with a specified
	file extension will be automatically renamed to have the new file extension.
        This feature is useful in situations where a file extension used on one
	system cannot be used on another (an example is .c++ vs. .cc for C++
	programs).  Any extension not in the list will be left alone.  If there
        are no file extensions specified, then no extensions will be translated.


	If a logfile is specified, then the server will maintain a log of all
	transactions with remote clients.


	This is a daemon program that will automatically background itself.
	The server can be shut down by a command from the client.



	distribute:

	The is the client program that causes the files to be transferred.
	All file names listed after the command line options will be sent to
	the server.  This program reads information about the client from
	a remote sites file which contains the following information:


	client_name   client_socket_number  the_remote_directory_destination


	This file has the default name of 'remote.sites', but the name can
	be overridden with a '-r' command line option:

	
	       distribute -r<site_file_name>


	Lines begining with '#' in the remote sites file are treated as comments
	and are ignored. Multiple clients can be named in this file, this will
	cause the specified files to be sent to all the named remote sites.


	Other options for distribute are:


	       -i        interactive execution, invoke a Y/N query for each
                         site in the site list.  This is useful for distributing
                         code to only some of the sites in the remote sites file.

	       -v        verbose exection, lists the files that are sent


	       -s        shutdown server, tells the server to exit after
	                 the files (if any) are sent.




	Security:

	These programs were written in order to ease the task of getting
	files from one machine to another in situations where NFS is either
	not practical or not allowed, and to be more efficient than using
	FTP or RSH.  As a consequence, there could be security problems
	when using these programs.  In order to provide some security, there
	is some verification done before the server actually does anything.
	The server checks to make sure it was contacted by the proper program
	(distribute) and that it supports the version of the client that
	contacted it.

	If a list of sites is given in the configuration file, then any remote
	sites NOT in the list will not be allowed to user the server.

        It also checks the user ID and group ID of the user that invoked the
        client (The check of the group ID can be defeated at compile time,
        by setting the define -DIGNORE_GID, this may be necessary if the remote
        and local systems do not use the same group IDs.   The check of the user
        ID can also be defeated at compile time by setting the define -DIGNORE_UID,
        if IGNORE_UID is defined, the group ID will also be ignored regardless of
        the setting of IGNORE_GID).  If a list of users is given in the
	configuration file, then any usernames NOT in the list will not be allowed
	to use the server.

	The server program also has a list of directories to which it is
        forbidden to write.  A minimal list is compiled into the program,
	this minimal list can be extended by editing the appropriate
        part of the source file: distributed.cc, the list includes: /, /bin,
        /usr/bin, /etc and /usr/etc.  Other site specific directories can be
        added by listing them in the runtime configuration file.


	If a logfile is specified, the server will maintain a log of all
	transactions with remote systems.  This can provide some useful information
	about who is using the server.




 Everett (Skip) Carter        Phone:  408-656-3318 FAX: 408-656-2712
 Naval Postgraduate School    INTERNET: skip@taygeta.oc.nps.navy.mil
 Dept. of Oceanography, Code OC/CR  UUCP:     ...!uunet!taygeta!skip
 Monterey, CA. 93943          TELEMAIL: s.carter/omnet


	 




