rpms/vsftpd/devel vsftpd-2.0.5-greedy.patch, NONE, 1.1 vsftpd.spec, 1.73, 1.74

Martin Nagy (mnagy) fedora-extras-commits at redhat.com
Mon Dec 3 12:16:50 UTC 2007


Author: mnagy

Update of /cvs/extras/rpms/vsftpd/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23278

Modified Files:
	vsftpd.spec 
Added Files:
	vsftpd-2.0.5-greedy.patch 
Log Message:
* Fri Nov 30 2007 Martin Nagy <mnagy at redhat.com> - 2.0.5-21
- Fix file listing issue with wildcard (#392181).


vsftpd-2.0.5-greedy.patch:

--- NEW FILE vsftpd-2.0.5-greedy.patch ---
diff -up vsftpd-2.0.5/ls.c.greedy vsftpd-2.0.5/ls.c
--- vsftpd-2.0.5/ls.c.greedy	2007-12-03 12:03:50.000000000 +0100
+++ vsftpd-2.0.5/ls.c	2007-12-03 12:12:05.000000000 +0100
@@ -303,6 +303,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));


Index: vsftpd.spec
===================================================================
RCS file: /cvs/extras/rpms/vsftpd/devel/vsftpd.spec,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- vsftpd.spec	30 Nov 2007 13:52:07 -0000	1.73
+++ vsftpd.spec	3 Dec 2007 12:16:17 -0000	1.74
@@ -46,6 +46,7 @@
 Patch33: vsftpd-2.0.5-userlist_log.patch
 Patch34: vsftpd-2.0.5-underscore_uname.patch
 Patch35: vsftpd-2.0.5-uname_size.patch
+Patch36: vsftpd-2.0.5-greedy.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 %if %{tcp_wrappers}
@@ -106,6 +107,7 @@
 %patch33 -p1 -b .userlist_log
 %patch34 -p1 -b .underscore_uname
 %patch35 -p1 -b .uname_size
+%patch36 -p1 -b .greedy
 
 %build
 %ifarch s390x
@@ -174,6 +176,7 @@
 - Removed user_config patch.
 - Fix nonrootconf patch (#400921).
 - Increase maximum length of allowed username (#236326).
+- Fix file listing issue with wildcard (#392181).
 
 * Thu Nov 08 2007 Martin Nagy <mnagy at redhat.com> - 2.0.5-20
 - Correct calling of pam_end (#235843).




More information about the fedora-extras-commits mailing list