Patch provided by John R. Johns II This patch adds an option "-8", which allows dropdown for RFC959 for anonymous users only, while all account holders must use SafeTP (like "-9"). To apply this patch: % cd sftpd-1.40 % patch < anon.patch.txt *** sftpd.cpp.orig Sun Nov 14 01:48:04 1999 --- sftpd.cpp Sat May 6 20:25:26 2000 *************** *** 180,181 **** --- 180,182 ---- allowRfc959(DEFAULT_ALLOW_RFC959), + allowRfc959_anon(DEFAULT_ALLOW_RFC959), allowNonReflexivePorts(DEFAULT_ALLOW_NONREFLEXIVE_PORT), *************** *** 363,364 **** --- 364,371 ---- allowRfc959 = false; + allowRfc959_anon = false; + break; + + case '8': + allowRfc959 = false; + allowRfc959_anon = true; break; *************** *** 1327,1331 **** handleOriginalRequest(request); } ! else { // disallow --- 1334,1352 ---- handleOriginalRequest(request); + break; // Exit this case } ! else if (allowRfc959_anon) { ! if ( (!strcmp(request.getData(),"ftp")) ! || (!strcmp(request.getData(),"anonymous")) ) { ! // 959 dropdown ! state = STATE_959_INTEROP; ! log("dropping down to 959 compatibility mode"); ! ! // call this function recursively to handle 959 command ! handleOriginalRequest(request); ! break; // Exit this case ! } ! } ! ! { // disallow *** sftpd.h.orig Fri Nov 12 17:19:05 1999 --- sftpd.h Sat May 6 19:40:10 2000 *************** *** 95,96 **** --- 95,97 ---- bool allowRfc959; // permit 959 dropdown + bool allowRfc959_anon; // permit 959 dropdown for anonymous bool allowNonReflexivePorts; // permit PORT addr != client_control addr