Bug 244864

Summary: vsftpd file listing issue with wildcard
Product: Red Hat Enterprise Linux 4 Reporter: Martin Poole <mpoole>
Component: vsftpdAssignee: Martin Nagy <mnagy>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 4.5CC: anuwat, hripps, mbarabas, mnagy, poelstra, tao
Target Milestone: ---Keywords: OtherQA
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0793 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-15 16:08:09 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:
Attachments:
Description Flags
patch to perform speculative scan forward on * match none

Description Martin Poole 2007-06-19 15:11:14 UTC
Description of problem:

The wildcarding code misses trivially valid cases

  ls *1

will match

  A1
  b9087654321

but will fail against

  a11

Version-Release number of selected component (if applicable):

vsftpd-2.0.1-5.EL4.5

How reproducible:

always

Steps to Reproduce:
1. create files on server  A1 A21 A11
2. ftp in and ls *1
3.
  
Actual results:

ftp> ls *1
 227 Entering Passive Mode (10,1,2,3,61,93)
 150 Here comes the directory listing.
 -rw-rw-r-- 1 500   500   0 Jun 11 00:30 A1
 -rw-r--r-- 1 0   0   0 Jun 12 01:55 A21

Expected results:

ftp> ls
 227 Entering Passive Mode (10,1,2,3,227,184)
 150 Here comes the directory listing.
 -rw-rw-r-- 1 500   500   0 Jun 11 00:30 A1
 -rw-rw-r-- 1 500   500   0 Jun 11 00:35 A11
 -rw-r--r-- 1 0   0   0 Jun 12 01:55 A21


Additional info:

The problem is due to the fact the match code is not greedy enough. Having found
a match it needs to speculatively scan for further matches without a permanent
failure.

Comment 1 Martin Poole 2007-06-19 15:11:15 UTC
Created attachment 157377 [details]
patch to perform speculative scan forward on * match

Comment 11 John Poelstra 2007-08-29 18:04:24 UTC
A fix for this issue should have been included in the packages contained in the
RHEL4.6 Beta released on RHN (also available at partners.redhat.com).  

Requested action: Please verify that your issue is fixed to ensure that it is
included in this update release.

After you (Red Hat Partner) have verified that this issue has been addressed,
please perform the following:
1) Change the *status* of this bug to VERIFIED.
2) Add *keyword* of PartnerVerified (leaving the existing keywords unmodified)

If this issue is not fixed, please add a comment describing the most recent
symptoms of the problem you are having and change the status of the bug to FAILS_QA.

If you cannot access bugzilla, please reply with a message to Issue Tracker and
I will change the status for you.  If you need assistance accessing
ftp://partners.redhat.com, please contact your Partner Manager.

Comment 14 errata-xmlrpc 2007-11-15 16:08:09 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0793.html