diff -rc wu-ftpd-2.3/FIXES-2.4 wu-ftpd-2.4/FIXES-2.4 *** wu-ftpd-2.3/FIXES-2.4 Wed Apr 13 15:58:41 1994 --- wu-ftpd-2.4/FIXES-2.4 Wed Apr 13 16:16:21 1994 *************** *** 0 **** --- 1,148 ---- + ====================== + = FTPD 2.x CHANGELOG = + ====================== + + If upgrading from version 2.1A or earlier, please read the + CAVEAT at the bottom of this file. + + Fixes in wu-ftpd-2.4 + o removed some race conditions + o fixed a spelling mistake + o now uses sys/syslog.h on Ultrix systems + + Fixes in wu-ftpd-2.3 + o renumbering to avoid confusing with trojan version + + Fixes in wu-ftpd-2.2 + o fixed bug in path processing of SITE EXEC commands. + o rewrote parts of private.c parsing routine. fixes problems with + overloading definition of gid_t. + o added support for class lists in separate file from UUNET + o changed a couple of occurrences of stat() to lstat() in delete() + and renamefrom() + o changed #ifdef LOG_LOCAL7 to #ifdef FACILITY in ftpd.c + + Fixes in wu-ftpd-2.1f + o fixed NeXT config problem with NGROUPS_MAX + o fixed multiple response bug with ftp|anonymous in /etc/ftpusers file + o fixed BUS ERROR on upload on Sun 4.1.x systems + + Fixes in wu-ftpd-2.1e + o fixed class determination code from failing after failed attempt + o moved ACCESS DENIED syslog messages to LOG_NOTICE from LOG_INFO + o fixed problems with NFS and server running as root. + o fixed problems with APPEND/OVERWRITE (thanks to J. Zawinski). + o patched SCO files to work with 3.2.4 (thanks to E. Vopicka). + o fixed problems with uid/gid's (hopefully for the last time...). + o Changed upload examples in ftpaccess.5 to be correct. + o allow for escaped #s in the ftpaccess file. (For path-filter, mostly). + o hostacc.c patches by abe@vic.cc.purdue.edu. + o ftpshut.c: fixed file open problem when shutdown not defined. + o added acl_remove() to fix problems with dangling PIDs in PID files. + o Fixed bug with real users > limit hanging clients. + + Fixes in wu-ftpd-2.1d + o **lost** + + Fixes in wu-ftpd-2.1c + o fixed stupid bug with non-initialized pointers in *_check() functions. + + Fixes in wu-ftpd-2.1b + o Append now works again. A previous fix to solved files not getting + truncated properly had broken it. + o Double conversions were not working properly for some conversions. + o Minor HP-UX portability problems corrected. + o Minor Host Access case sensitivity bug fixed. + o syslog after chroot fixed for SunOS by addition of TCP version of + syslog functions. (it is syslog.c in the support directory) + o Data General support added. + o ISC support added. + o Added "rename " option to prevent renaming files. + o Fixed unsigned int comparisons to -1 + o added ckconfig program for checking proper locations of config files. + o changed syntax of "upload" command to include which ftp hierarchy it + pertains. + o fixed some documentation bugs. + + Fixes in wu-ftpd-2.1a + o tabs were put back into the Makefiles for aix. + o acl_join() did not open the pid file is pidfd was invalid. + o acl_join() did not unlock the pid file if user was already in there. + + Fixes in wu-ftpd-2.1 + o xferstats: updated version written by Dave Datta. (datta@cs.uwp.edu) + o upload: default was to not allow uploads ever. This is backwards, if + no upload keywords are given, it should act like a normal server. + o double conversion: double conversion stuff works now... but you know that + already. Included is a gzip2comp (in util) for converting from + gzip format to compress. + o cwd_beenhere(): now calls realpath(".", cwd) to figure out the path. + This works for people in directories that are private. That + is that some component of their path is not readable by them. + (cwdir() fails in such a case.) + o upload: trying to set a file mode of 0000 would fail. This is now + possible. + o makedir: Did not work properly for real users. This has also been + fixed. + o fixed up support for NeXT and other systems. I can not test these things, + so there are bound to be problems. + o getgrent.c: removed the need for getgrent.c from the support library. + This caused problems with systems running yellow pages (NIS). + All gids in the private file are now parsed before the chroot(). + This gives us one less open file descriptor. + o upload/truncate: STORE was not properly trunctating files when + overwriting them. + o upload failing with directories in makedir/put commands: STORE and + MAKEDIR were failing when giving full path names. + o process ids: multiple process ids were written into the pid-files when + a failed login attempt was made. This caused problems with + usage counts. + o %E magic cookie: the %E cookie gets replaced with the "email" string + from the ftpaccess file. + o %F magic cookie: added trivial support for Solaris 2.1 (at least). + If you fix this for your system, send me a patch. + o %N magic cookie: did not work after the chroot(). The pid file has + to remain open for the duration of the server's life now in + order for this to work. + o support/paths.h: removed the need for this file. It caused more + problems than it was worth. The two #defines that were used + were moved to src/pathnames.h + o upload * no dirs: you can now specify a directory that does not allow + uploads but does allow the creation of directories. + o alias list: you can now get a listing of what aliases are available. + at the ftp prompt type "quote site alias". + o cdpath: you can now specify a cdpath (like the csh variable). + o email: you can specify an email address for the maintainer of the + archive. This string will be used for the %E magic cookie. + + ========== + = CAVEAT = + ========== + + There has been a change in the syntax of the "upload" keyword in the + ftpaccess file. + + OLD syntax: upload + NEW syntax: upload + + The argument is the ftp hierarchy that the upload command + now applies to. This allows for the "upload" keyword to be used by + guest and anonymous users, instead of just anonymous. + + To migrate your < 2.1A ftpaccess to 2.1B or greater, just add the home + directory of the ftp account to each upload line. + + For example: + ftp:*:10000:31:FTP user:/home/ftp:/bin/true + + [2.1A ftpaccess] + upload * yes + upload /bin/* no + upload /etc/* no + upload /incoming* yes bryan onc 0644 nodirs + + [2.1B or greater ftpaccess] + upload /home/ftp * yes + upload /home/ftp /bin/* no + upload /home/ftp /etc/* no + upload /home/ftp /incoming* yes bryan onc 0644 nodirs diff -rc wu-ftpd-2.3/src/access.c wu-ftpd-2.4/src/access.c *** wu-ftpd-2.3/src/access.c Mon Apr 4 16:24:23 1994 --- wu-ftpd-2.4/src/access.c Wed Apr 13 16:02:22 1994 *************** *** 34,40 **** --- 34,44 ---- #include #include #include + #ifdef SYSSYSLOG + #include + #else #include + #endif #include #include #include diff -rc wu-ftpd-2.3/src/acl.c wu-ftpd-2.4/src/acl.c *** wu-ftpd-2.3/src/acl.c Fri Apr 1 13:03:39 1994 --- wu-ftpd-2.4/src/acl.c Wed Apr 13 16:02:25 1994 *************** *** 34,40 **** --- 34,44 ---- #include #include #include + #ifdef SYSSYSLOG + #include + #else #include + #endif #include #include diff -rc wu-ftpd-2.3/src/conversions.c wu-ftpd-2.4/src/conversions.c *** wu-ftpd-2.3/src/conversions.c Fri Apr 1 13:03:39 1994 --- wu-ftpd-2.4/src/conversions.c Wed Apr 13 16:02:35 1994 *************** *** 33,39 **** --- 33,43 ---- #include #include + #ifdef SYSSYSLOG + #include + #else #include + #endif #include #include #include diff -rc wu-ftpd-2.3/src/extensions.c wu-ftpd-2.4/src/extensions.c *** wu-ftpd-2.3/src/extensions.c Fri Apr 1 13:03:40 1994 --- wu-ftpd-2.4/src/extensions.c Wed Apr 13 16:02:46 1994 *************** *** 34,40 **** --- 34,44 ---- #include #include #include + #ifdef SYSSYSLOG + #include + #else #include + #endif #include #include #include diff -rc wu-ftpd-2.3/src/ftpcmd.y wu-ftpd-2.4/src/ftpcmd.y *** wu-ftpd-2.3/src/ftpcmd.y Fri Apr 1 13:03:40 1994 --- wu-ftpd-2.4/src/ftpcmd.y Wed Apr 13 16:02:56 1994 *************** *** 56,62 **** --- 56,66 ---- #include #include #include + #ifdef SYSSYSLOG + #include + #else #include + #endif #include #include #include diff -rc wu-ftpd-2.3/src/ftpcount.c wu-ftpd-2.4/src/ftpcount.c *** wu-ftpd-2.3/src/ftpcount.c Fri Apr 1 13:03:40 1994 --- wu-ftpd-2.4/src/ftpcount.c Wed Apr 13 16:03:02 1994 *************** *** 34,40 **** --- 34,44 ---- #include #include #include + #ifdef SYSSYSLOG + #include + #else #include + #endif #include #include #include diff -rc wu-ftpd-2.3/src/ftpd.c wu-ftpd-2.4/src/ftpd.c *** wu-ftpd-2.3/src/ftpd.c Fri Apr 1 13:03:40 1994 --- wu-ftpd-2.4/src/ftpd.c Wed Apr 13 16:17:18 1994 *************** *** 72,78 **** --- 72,82 ---- #include #include #include + #ifdef SYSSYSLOG + #include + #else #include + #endif #include #include "conversions.h" #include "extensions.h" *************** *** 1478,1490 **** (name = gunique(name)) == NULL) return; #ifdef OVERWRITE /* if overwrite permission denied and file exists... then deny the user * permission to write the file. */ while (getaclentry("overwrite", &entry) && ARG0 && ARG1 != NULL) { if (type_match(ARG1)) ! if (strcmp(ARG0, "yes")) overwrite = 0; } if (!overwrite && !stat(name, &st)) { --- 1482,1502 ---- (name = gunique(name)) == NULL) return; + /* + * check the filename, is it legal? + */ + if ( (fn_check(name)) <= 0 ) + return; + #ifdef OVERWRITE /* if overwrite permission denied and file exists... then deny the user * permission to write the file. */ while (getaclentry("overwrite", &entry) && ARG0 && ARG1 != NULL) { if (type_match(ARG1)) ! if (strcmp(ARG0, "yes") != 0) { overwrite = 0; + open_flags |= O_EXCL; + } } if (!overwrite && !stat(name, &st)) { *************** *** 1493,1504 **** } #endif /* OVERWRITE */ - /* - * check the filename, is it legal? - */ - if ( (fn_check(name)) <= 0 ) - return; - #ifdef UPLOAD if ( (match_value = upl_check(name, &uid, &gid, &f_mode, &valid)) < 0 ) return; --- 1505,1510 ---- *************** *** 1507,1513 **** if (mode[0] == 'a' || (mode[0] == 'r' && mode[0] == '+') || restart_point) trunc = 0; ! /* if the user has an explicit new file ode, than open the file using * that mode. We must take care to not let the umask affect the file * mode. * --- 1513,1519 ---- if (mode[0] == 'a' || (mode[0] == 'r' && mode[0] == '+') || restart_point) trunc = 0; ! /* if the user has an explicit new file mode, than open the file using * that mode. We must take care to not let the umask affect the file * mode. * *************** *** 1528,1535 **** if (valid > 0) { oldid = geteuid(); (void) seteuid((uid_t) 0); ! if ((chown(name, uid, gid)) < 0) ! perror_reply(550, "chown"); (void) seteuid(oldid); } #endif /* UPLOAD */ --- 1534,1544 ---- if (valid > 0) { oldid = geteuid(); (void) seteuid((uid_t) 0); ! if ((fchown(fdout, uid, gid)) < 0) { ! (void) seteuid(oldid); ! perror_reply(550, "fchown"); ! return; ! } (void) seteuid(oldid); } #endif /* UPLOAD */ *************** *** 2243,2249 **** { uid_t uid; gid_t gid; - uid_t oldid; int valid = 0; /* --- 2252,2257 ---- *************** *** 2261,2276 **** if (mkdir(name, 0777) < 0) { perror_reply(550, name); return; - } else - reply(257, "MKD command successful."); - - if (valid > 0) { - oldid = geteuid(); - (void) seteuid((uid_t) 0); - if ((chown(name, uid, gid)) < 0) - perror_reply(550, "[makedir] chown"); - (void) seteuid(oldid); } } removedir(char *name) --- 2269,2277 ---- if (mkdir(name, 0777) < 0) { perror_reply(550, name); return; } + + reply(257, "MKD command successful."); } removedir(char *name) diff -rc wu-ftpd-2.3/src/hostacc.h wu-ftpd-2.4/src/hostacc.h *** wu-ftpd-2.3/src/hostacc.h Fri Apr 1 13:03:44 1994 --- wu-ftpd-2.4/src/hostacc.h Wed Apr 13 16:14:42 1994 *************** *** 18,24 **** --- 18,28 ---- #ifdef HOST_ACCESS #include + #ifdef SYSSYSLOG + #include + #else #include + #endif #include #include #include diff -rc wu-ftpd-2.3/src/logwtmp.c wu-ftpd-2.4/src/logwtmp.c *** wu-ftpd-2.3/src/logwtmp.c Fri Apr 1 13:03:42 1994 --- wu-ftpd-2.4/src/logwtmp.c Wed Apr 13 16:03:47 1994 *************** *** 42,48 **** --- 42,52 ---- #include #include #include + #ifdef SYSSYSLOG + #include + #else #include + #endif #include "pathnames.h" diff -rc wu-ftpd-2.3/src/makefiles/Makefile.ult wu-ftpd-2.4/src/makefiles/Makefile.ult *** wu-ftpd-2.3/src/makefiles/Makefile.ult Fri Apr 1 13:03:29 1994 --- wu-ftpd-2.4/src/makefiles/Makefile.ult Wed Apr 13 15:55:03 1994 *************** *** 1,7 **** CC = cc IFLAGS = -I.. -I../support LFLAGS = -L../support ! CFLAGS = -Dconst="" -O -DDEBUG ${IFLAGS} ${LFLAGS} LIBES = -lsupport LIBC = /lib/libc.a LINTFLAGS= --- 1,7 ---- CC = cc IFLAGS = -I.. -I../support LFLAGS = -L../support ! CFLAGS = -Dconst="" -O -DDEBUG -DSYSSYSLOG ${IFLAGS} ${LFLAGS} LIBES = -lsupport LIBC = /lib/libc.a LINTFLAGS= diff -rc wu-ftpd-2.3/src/newvers.sh wu-ftpd-2.4/src/newvers.sh *** wu-ftpd-2.3/src/newvers.sh Mon Apr 4 16:24:46 1994 --- wu-ftpd-2.4/src/newvers.sh Wed Apr 13 13:41:33 1994 *************** *** 20,25 **** if [ ! -r edit ]; then echo 0 > edit; fi touch edit awk ' { edit = $1 + 1; }\ ! END { printf "char version[] = \"Version wu-2.3(%d) ", edit > "vers.c";\ printf "%d\n", edit > "edit"; }' < edit echo `date`'";' >> vers.c --- 20,25 ---- if [ ! -r edit ]; then echo 0 > edit; fi touch edit awk ' { edit = $1 + 1; }\ ! END { printf "char version[] = \"Version wu-2.4(%d) ", edit > "vers.c";\ printf "%d\n", edit > "edit"; }' < edit echo `date`'";' >> vers.c diff -rc wu-ftpd-2.3/src/private.c wu-ftpd-2.4/src/private.c *** wu-ftpd-2.3/src/private.c Fri Apr 1 13:03:43 1994 --- wu-ftpd-2.4/src/private.c Wed Apr 13 16:03:53 1994 *************** *** 36,42 **** --- 36,46 ---- #include #include #include + #ifdef SYSSYSLOG + #include + #else #include + #endif #include #include