From owner-freebsd-hackers Wed May 22 22:43:39 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id WAA18657 for hackers-outgoing; Wed, 22 May 1996 22:43:39 -0700 (PDT) Received: from wipro.wipsys.soft.net (wipro.wipsys.soft.net [164.164.24.6]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id WAA18260 for ; Wed, 22 May 1996 22:39:57 -0700 (PDT) Received: by wipro.wipsys.soft.net (8.6.13/1.35) id FAA11816; Thu, 23 May 1996 05:39:08 GMT From: malli@wipro.wipsys.soft.net (Mallikarjuna Rao) Message-Id: <199605230539.FAA11816@wipro.wipsys.soft.net> Subject: why globbing is partial in ftp?? To: freebsd-hackers@FreeBSD.ORG Date: Thu, 23 May 1996 11:09:05 +0530 (IST) Cc: malli@wipro.wipsys.soft.net (Mallikarjuna Rao) X-Mailer: ELM [version 2.4 PL22] Content-Type: text Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Hi Hackers, The ftpd(server) does globbing if the path includes ~. Otherwise it does not. For example: if "/usr/malli" is my home directory and test is a directory in my home directory. After loggin If I do ftp> cd ~malli/tes* It works. If I do ftp> cd tes* (from /usr/malli) It does not work. (test directory exists in /usr/malli) Same thing applys for all ftp commands like get, put, ... This is because, the 659th line of ftpcmd.y in ftpd checks if the first character in the path is ~ or not. If it is ~ then it does globbing else it does not. Following are few lines of the code if (logged_in && $1 && *$1 == '~') { glob_t gl; int flags = This behavior of ftp cd command is different from the unix cd command. I want to know whether this is the standard behavior of ftp or is this a bug?. Thanks in advance, Malli.