Path: sparky!uunet!cs.utexas.edu!uwm.edu!spool.mu.edu!munnari.oz.au!manuel!cumulus!tridge
From: tri...@nimbus.anu.edu.au (Andrew Tridgell)
Newsgroups: vmsnet.networks.desktop.pathworks,vmsnet.networks.desktop.misc
Subject: generic file server availability (announcement)
Message-ID: <1992Jan14.235902.3027@newshost.anu.edu.au>
Date: 14 Jan 92 23:59:02 GMT
Article-I.D.: newshost.1992Jan14.235902.3027
Sender: n...@newshost.anu.edu.au
Organization: Australian National University, Canberra
Lines: 196
Originator: tridge@cumulus

This is a note to announce the availability of version 1.0 of the
generic unix file server via ftp.

The source is available via anonymous ftp from yaouk.anu.edu.au in the
pub/nbserver directory.

All updates will be put here in future. If you don't have anon ftp
access send me some mail and I should get around to mailing it to you.

There have been several changes since version 0.5 which I announced
previously. In particular note the changed SERVICES file format. Have a
look at the release_notes file for further details.

The README file follows:

**********************************************************************
Welcome to version 1.0 of a Unix file server for Dos Pathworks. (I
haven't thought of a catchy name yet)

This software was written to allow users of Pathworks to access file
services from non-DEC machines. In doing so I did not realise that I 
had in fact implemented the netbios protocol. This means that (in theory
at least) this software could be used with other PC clients, not just the
Pathworks for DOS client. The software should work with either Decnet or
TCP/IP. I have only tested it with TCP/IP.

This package offers some advantages over the DEC product in that it has flags
in the services file which can disable/enable guest connections, and enable/disable
the /setdir switch (for changing the root of the connection) and enable/disable
writing to the service.

The software is still being enhanced, so you will probably see more versions in 
the near future. I have listed some known bugs at the end of this file, if you
want to help fix them then please do and send me the changes for incorporation 
in the next release.

Please report any problems with this software to Andrew Tridgell, at the
email address "Andrew.Tridg...@anu.edu.au". I don't guarantee to fix the
problem but I'll try my best. Also as I got a big response from the
vmsnet.networks.desktop.pathworks news group perhaps some of the
problems could be discussed there.

Use this software at your own risk. No responsability is taken by the
author for any problems caused by this software.

Installation:
=============

Step 1:
	Unpack the software into some appropriate directory on the
server. Something like /usr/local/pcsa would be typical.

Step 2:
	Edit the file "local.h" to define local preferences. At the top
you should put a define for the architecture you are compiling on.
Currently the ones recognised are

	#define SUN		/* for a sun sparcstation */
or	#define ULTRIX		/* for a decstation */
or	#define AIX		/* for a rs6000 */
or 	#define SGI		/* for a silicon graphics box */
or 	#define SEQUENT		/* for a sequent symmetry running dynix */

	Also make sure you edit the defines for PCSAIN, PCSAOUT,
DEBUGFILE.  These should be filenames in some appropriate directory
where you want debug information to be held.  If DEBUGLEVEL is 0 then
they will never be used.  If DEBUGLEVEL is 1 then DEBUGFILE will contain
various status messages.  If DEBUGLEVEL is 2 then DEBUGFILE will contain
more verbose status messages.  If DEBUGLEVEL is 3 then a complete binary
record of all transactions between the client and server are kept in
PCSAIN and PCSAOUT. 
	The file pointed to by SERVICES should contain a pure ascii
list of the file services you want available and the paths to the
services. It is NOT in the same format as the DEC service.db. The format
will be explained more below.
	The GUEST_ACCOUNT macro should point to the default account for
the server. This plays the same role as the pcguest account for the dec
server. If you choose to create this account note that a valid password
for the account is not required. Also note that guest access can be disabled
for some or all of the services in the SERVICES file.
	The PWDAUTH macro should be defined if your system supports the
pwdauth(user,password) call. Try "man pwdauth" to see if you have it. If
the compiler complains that it can't find _pwdauth then undef this #define.

Step 3:
	Compile the code. This should require just a command like:
"cc -o server server.c" If the compilation produces errors then fix
them! I have compiled without errors on the architectures listed above.

Step 4:
	Create (or just edit) the SERVICES file you defined above. The
file consists of an ascii file containing three columns separated by
spaces or tabs. The first column gives a service name (such as pccommon)
and the second gives a path to the place where the files will be stored
for this service (such as /usr/local/pccommon ). The third column (which
is optional) contains flags. A 'W' flag means the service can be written to.
A 'S' flag means that the /setdir function is allowed on this
service. (not including this would prevent people attaching to directories 
other than the specified directory). A 'G' flag means that guest connections are 
allowed. Lines beginning with a # are assumed to be comments and will be ignored.
	Please look at the services file supplied with this package as an example.

Step 5:
	Edit the file /etc/services (as root). A line like this should
be added:

pcsafstcp	139/tcp				# pathworks file server

	Edit the file /etc/inetd.conf (as root). AA line like this
should be added:

On Ultrix:
pcsafstcp	stream	tcp	nowait	/usr/local/pcsa/server pcsafs

On Sun's:
pcsafstcp	stream	tcp	nowait	root	/usr/local/pcsa/server pcsafs

where you replace the /usr/local/pcsa/server with whatever path and name
you want to call the server executable. On other architectures just take
a look at the format for the other /etc/inetd.conf entries.

NOTE: Some unixes are fussy about presence or lack of new lines at the
end of /etc/services and /etc/inetd.conf. If you add the lines NOT as
the last line in the file you are more likely to get it to work. Adding
at the top or half way down can be a good idea.


Step 6:
	Kill and restart inetd, or send it a HUP signal. eg: 
kill -HUP .

or

kill  ; /etc/inetd

Step 7:
	Try it out! If you can't get it to work then some good
diagnostics and to do a "netstat" just after trying the connection. If
it shows up pcsafs then a connection is made. Setting the DEBUGLEVEL to
1 or 2 can also be helpful in diagnosing problems.


BUGS:
=====

**	Errors are not reported correctly to the PC. You may get an
Access denied when it should be a "File not found". 

**	I may not have implemented all the server functions. I have only
implemented those that I have observed happening on my system. If you
have DEBUGLEVEL greater than 0 then a "unknown command" will be put in
the DEBUGFILE. The server will send a "access denied" error to the PC.
Please send me details on how you produced the problem, so I can fix it.

**	The total disk space and disk free will be reported incorrectly
on many servers. Can someone show me how to write a routine that will
return the total disk space and the disk free (preferably using quotas
if they are in use). I have done it for ultrix but can't see how to do
it reliably for lots of platforms.

**	The server does not support the extended open commands (for multi-user 
fie sharing. If anyone wants this then they can hack reply_open() to do it.

**	If you have a service for the root directory on some servers then
a DIR will produce weird results.

**	The attribute mapping between DOS and unix is different to the
DEC one (I think mine is better). If you want dec's method then change
the dos_mode() and unix_mode() functions.

** 	Only lowercase files can be seen. This removes the possability
of dos seeing two files with the same name.

**	I cannot guarantee that this software does not have security
holes. I tried to use chroot() to make sure you are always in the right
part of the tree but found it impossible to undo the chroot() when a
packet for a new service arrived. I was forced to use chdir() instead. I
also use seteuid() and setegid() before allowing any file operations. I
have not found any way to breach security with this system but that does
not mean someone else won't be able to. If anyone has a suggestion on this
then let me know.

**	touch on unix files from a dos system does not seem to function
properly (I am using Borlands touch).







-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Andrew Tridgell                 CSLab, Research School of Physical Sciences
Andrew.Tridg...@anu.edu.au      Australian National University (x3064, x2454)
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Newsgroups: comp.unix.ultrix
Path: sparky!uunet!munnari.oz.au!manuel!nimbus!tridge
From: tri...@nimbus.anu.edu.au (Andrew Tridgell)
Subject: Pathworks from non DEC servers
Message-ID: <1992Jan15.230611.13476@newshost.anu.edu.au>
Originator: tridge@nimbus
Sender: n...@newshost.anu.edu.au
Organization: Australian National University, Canberra
Date: Wed, 15 Jan 92 23:06:11 GMT

For those of you running the Pathworks for DOS software to mount file
services on PC's, but who also have Sun's or other unix boxes you may be
interested in a generic file server I have written that will allow the
use of file services from many different unixes.

It is available from yaouk.anu.edu.au in the directory pub/nbserver

Andrew

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Andrew Tridgell                 CSLab, Research School of Physical Sciences
Andrew.Tridg...@anu.edu.au      Australian National University (x3064, x2454)
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-