 This is my port of ftpd 5.28 from BSD to MiNT.

 You'll need at least MiNTNet 0.41 (and therefore a patched MiNT 1.10) to
run it, plus Kay Roemers `portlib' and Stephen Ushers MiNTOS library with
his `crypt()' routine to recompile it, if you should want to do that.

*******   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 have applied Ulrich Kuehn's Pseteuid/Psetegid patch for MiNT.
	If you didn't do so, ftpd won't be able to switch between the user id
	of the client requesting data and superuser, which it must do in order
	to create data sockets. The effect of all this is that you'll get a
	"can't create data socket" error message if you try to use it with an
	user id other that superuser. The supplied binary uses these calls
	without any check, so it will show the above mentioned behaviour if
	you haven't the correct version of MiNT. The source code requires the
	presence of a `Pseteuid' call in mintbind.h, sorry, but that's the
	only check.

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 lacks a saved-setuser-id and therefore couldn't
	switch back to superuser to create another data socket later. Sorry,
	there isn't very much of a diff here, just replace every occurence of
	Getuid/Getgid in minixfs.c of the MinixFS source distribution with
	Geteuid/Getegid and recompile it. 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. 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, but-reports and flames are welcome... ;-)

 Besides that: No warranty and so on... 

ciao,
TeSche
--
Torsten Scherer (TeSche, Schiller...)
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.					|
