 This is version 03 of my BSD ftpd port for MiNT.

 You'll need at least MiNTNet 0.41 (and therefore a patched MiNT 1.10) to
run it, plus Kay Roemers `portlib' and the library from Stephen Ushers
MiNTOS 1.2 package, because of the `crypt()' routine for password checking.
Since I prefer compiling my stuff with `-mbaserel' and there isn't such a
library in the package, I enclude it here. If you want the source, get the
MiNTOS package.

*******   IMPORTANT NOTES   *******

 There are two more or less severe security problems with the current public
releases of Mint (say: plain 1.10) and MinixFS (say: V0.6PL10)

1) You've got to either use a MiNT which has got a Pseteuid() call at gemdos
	0x143, or apply the supplied patch `patch.mint110' (originally written
	by Ulrich Kuehn) to MiNT first, otherwise you won't be able to use
	this ftpd. It severely needs this patch and therefore, from this
	version on, there's a check in it which makes it shut down the
	connection if your MiNT doesn't have it. If you get a reply saying:
	"operating system problem", your MiNT does not include this patch yet.
	The patch is relative to virgin 1.10, sorry, but a greater consence
	isn't out yet and 1.11 will probably already contain it. You should
	also apply the patch `patch.mintbind.h' to your mintlib to be able
	to use this new calls.

	 Due to the amount of MiNT patches for 1.10, which not everybody has
	included, you'll probably get problems when applying these patches,
	because they won't fit exactly. But they should show you a way how to
	do it. Sorry, but I haven't got a better solution at the moment.

	 After this, you *should* be able to recompile/use this ftpd. :-)


2) Even if you've done this, you've got to patch MinixFS to use the effective
	values of uid and gid to create new files and not the real values, as
	it does until now. Otherwise you can log in as any user, but if you
	*upload* files they will be owned by root. Other programs fix this by
	also switching the real values to the effective one, but we can't do
	this here, because MiNT (still) lacks a saved-setuser-id and therefore
	can't switch back to superuser to create another data socket later.
	What *you* can do is apply the patch `patch.minixfs.c' to MinixFS.
	You're not really thinking of running this on anything else but
	MinixFS, are you? ;-)

 So it's up to you how secure you want to make your system...

 This version of ftpd allows you to have a log file in /var/adm/ftp.log if
you invoke it with -e as argument, where each up/download is logged. There've
been a lot of bugs in the patch to add this to ftpd. I think I've fixed them,
but one never knows...

 To install ftpd, you've got to copy the binary to any appropriate place and
edit /etc/inetd.conf so that the `ftp' line looks like:

ftp	stream	tcp	nowait	root	/etc/ftpd	ftpd

 or, if you'd like to enable logging:

ftp	stream	tcp	nowait	root	/etc/ftpd	ftpd -e

 where you should replace /etc/ftpd with the path you've copied ftpd to, if
it's another one.

 All comments, bug-reports and flames are welcome... ;-)

 Besides that: No warranty and so on... 

ciao,
TeSche
--
Torsten Scherer (TeSche, Schiller...), itschere@techfak.uni-bielefeld.de
Faculty of Technology, University of Bielefeld, Germany, Europe, Earth...
| Use any of "finger itschere@129.70.131.2-15" for adresses and more.	|
| Last updated: Probably yesterday.					|
