[VCS] vsftpd branch, debian, updated. debian/2.2.0-3-4-g13ba5e5

Daniel Baumann daniel at debian.org
Sun Oct 18 09:50:56 UTC 2009


The following commit has been merged in the debian branch:
commit 13ba5e569ca845b23dde7b9bd181861dc966485a
Author: Daniel Baumann <daniel at debian.org>
Date:   Sun Oct 18 11:50:02 2009 +0200

    Adding patch from Martin Nagy <mnagy at redhat.com> to fix file listing issue with wildcards.

diff --git a/debian/patches/09-greedy.patch b/debian/patches/09-greedy.patch
new file mode 100644
index 0000000..ff73c9c
--- /dev/null
+++ b/debian/patches/09-greedy.patch
@@ -0,0 +1,32 @@
+Author: Martin Nagy <mnagy at redhat.com>
+Description: Fix file listing issue with wildcard (Bugzilla: #392181).
+
+diff -Naurp vsftpd.orig/ls.c vsftpd/ls.c
+--- vsftpd.orig/ls.c	2009-10-02 14:15:18.000000000 +0200
++++ vsftpd/ls.c	2009-10-18 11:48:29.000000000 +0200
+@@ -281,6 +281,25 @@ vsf_filename_passes_filter(const struct 
+       {
+         goto out;
+       }
++      if (!must_match_at_current_pos)
++      {
++        struct mystr scan_fwd = INIT_MYSTR;
++
++        str_mid_to_end(&name_remain_str, &scan_fwd,
++                        indexx + str_getlen(&s_match_needed_str));
++        /* We're allowed to be greedy, test if it match further along
++         * keep advancing indexx while we can still match.
++         */
++        while( (locate_result = str_locate_str(&scan_fwd, &s_match_needed_str)),
++            locate_result.found )
++        {
++          indexx += locate_result.index + str_getlen(&s_match_needed_str);
++          str_mid_to_end(&scan_fwd, &temp_str,
++                         locate_result.index + str_getlen(&s_match_needed_str));
++          str_copy(&scan_fwd, &temp_str);
++        }
++       str_free(&scan_fwd);
++      }
+       /* Chop matched string out of remainder */
+       str_mid_to_end(&name_remain_str, &temp_str,
+                      indexx + str_getlen(&s_match_needed_str));
diff --git a/debian/patches/series b/debian/patches/series
index d19d4da..c64f1d1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@
 06-alpha.patch
 07-link-local.patch
 08-whitespaces.patch
+09-greedy.patch

-- 
vsftpd



More information about the daniel-vcs mailing list