Bug 641239

Summary: [RFE] vsftpd can not handle square brackets in ls
Product: Red Hat Enterprise Linux 5 Reporter: Daniel Paessens <daniel.paessens>
Component: vsftpdAssignee: Jiri Skala <jskala>
Status: CLOSED ERRATA QA Contact: Dalibor Pospíšil <dapospis>
Severity: medium Docs Contact:
Priority: low    
Version: 5.2CC: aglotov, amarecek, bgollahe, dapospis, mpoole, ovasik, ykawada
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 785084 (view as bug list) Environment:
Last Closed: 2012-02-21 05:32:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 785084    
Attachments:
Description Flags
the patch implementing square brackets mhlavink: review+

Description Daniel Paessens 2010-10-08 06:14:53 UTC
Description of problem:
When inside a ftp coneection you can not use square brackets for create your regex. For example ls *[a]*

Version-Release number of selected component (if applicable):
vsftpd-2.0.5-12.el5
2.0.5-16.el5_5.1

How reproducible:
Always

Steps to Reproduce:
1. Create some files on your homedirectory
2. FTP to your hosts
3. query a ls with square brackets
  
Actual results:
Show nothing
ls *[a]*
227 Entering Passive Mode (172,18,88,3,211,133)
150 Here comes the directory listing.
226 Directory send OK.

Expected results:
List all files with the letter(s) in the filename

Additional info:

Comment 1 Jiri Skala 2010-10-11 14:29:50 UTC
Vsftpd supports intentionally only "*" and "?" wild chars in the last component of the path. This is due to avoiding usage of library function fnmatch().

This request is asking for new feature.

Comment 9 RHEL Program Management 2011-01-11 20:32:41 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 10 RHEL Program Management 2011-01-12 15:19:57 UTC
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.

Comment 19 Jiri Skala 2011-08-31 11:59:04 UTC
Created attachment 520805 [details]
the patch implementing square brackets

Comment 21 Dalibor Pospíšil 2011-12-06 15:14:11 UTC
:: [  BEGIN   ] ::   ftp 127.0.0.1
Connected to 127.0.0.1.
220 (vsFTPd 2.0.5)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (127.0.0.1:root): ftptest
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> mkdir test1
mkdir test2
mkdir test3
ls test*
ls test[13]
257 "/home/ftptest/test1" created
ftp> 257 "/home/ftptest/test2" created
ftp> 257 "/home/ftptest/test3" created
ftp> 227 Entering Passive Mode (127,0,0,1,145,186)
150 Here comes the directory listing.
drwxr-xr-x    2 501      501          4096 Nov 29 16:19 test1
drwxr-xr-x    2 501      501          4096 Nov 29 16:19 test2
drwxr-xr-x    2 501      501          4096 Nov 29 16:19 test3
226 Directory send OK.
ftp> 227 Entering Passive Mode (127,0,0,1,229,234)
150 Here comes the directory listing.
drwxr-xr-x    2 501      501          4096 Nov 29 16:19 test1
drwxr-xr-x    2 501      501          4096 Nov 29 16:19 test3
bye
226 Directory send OK.
ftp> 221 Goodbye.
:: [   PASS   ] ::   ftp 127.0.0.1

Comment 22 errata-xmlrpc 2012-02-21 05:32:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0187.html