From owner-freebsd-bugs@FreeBSD.ORG Fri Oct 8 04:10:31 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 253C916A4CE for ; Fri, 8 Oct 2004 04:10:31 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1775543D5A for ; Fri, 8 Oct 2004 04:10:31 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i984AUqm046095 for ; Fri, 8 Oct 2004 04:10:30 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i984AUgm046093; Fri, 8 Oct 2004 04:10:30 GMT (envelope-from gnats) Date: Fri, 8 Oct 2004 04:10:30 GMT Message-Id: <200410080410.i984AUgm046093@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Ryan Sommers Subject: Re: bin/72425: ftpd SITE command case sensitivity X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Ryan Sommers List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Oct 2004 04:10:31 -0000 The following reply was made to PR bin/72425; it has been noted by GNATS. From: Ryan Sommers To: freebsd-gnats-submit@FreeBSD.org, drick@edigic.com Cc: Subject: Re: bin/72425: ftpd SITE command case sensitivity Date: Thu, 07 Oct 2004 23:07:54 -0500 This is actually not a bug in ftpd: (root@blue)~:telnet 192.168.0.2 21 Trying 192.168.0.2... Connected to blue. Escape character is '^]'. 220 blue FTP server (Version 6.00LS) ready. USER ryans 331 Password required for ryans. PASS ********** 230 User ryans logged in. pwd 257 "/usr/home/ryans" is current directory. PWD 257 "/usr/home/ryans" is current directory. SITE 500 'SITE': command not understood. SITE CHMOD 777 dump.log 200 CHMOD command successful. site chmod 777 dump.log 200 CHMOD command successful. ^] telnet> close Connection closed. Instead, this is, a 'feature'(or bug), of the ftp client. The following patch should fix the ftp client though. I haven't tested it, so if someone imports it might want to be sure it compiles first. Index: main.c =================================================================== RCS file: /home/ncvs/src/contrib/lukemftp/src/main.c,v retrieving revision 1.1.1.5 diff -u -r1.1.1.5 main.c --- main.c 3 Nov 2003 17:12:05 -0000 1.1.1.5 +++ main.c 8 Oct 2004 04:06:30 -0000 @@ -114,6 +114,7 @@ #include #include +#include #include #include #include @@ -724,7 +725,7 @@ nmatches = 0; found = 0; for (c = cmdtab; (p = c->c_name) != NULL; c++) { - for (q = name; *q == *p++; q++) + for (q = name; toupper(*q) == toupper(*p++); q++) if (*q == 0) /* exact match? */ return (c); if (!*q) { /* the name was a prefix */ -- Ryan Sommers ryans@gamersimpact.com