- fixed bug messaged in RHEL-4 #479774 - Wildcard failures with vsftpd

This commit is contained in:
Jiri Skala 2009-09-08 11:05:03 +00:00
parent b2ea86ec63
commit 03c7b6d9d7
2 changed files with 43 additions and 1 deletions

View File

@ -0,0 +1,37 @@
diff -up vsftpd-2.2.0/ls.c.wildchar vsftpd-2.2.0/ls.c
--- vsftpd-2.2.0/ls.c.wildchar 2009-09-08 12:49:51.679476554 +0200
+++ vsftpd-2.2.0/ls.c 2009-09-08 12:52:53.778427990 +0200
@@ -303,24 +303,19 @@ vsf_filename_passes_filter(const struct
{
goto out;
}
- if (!must_match_at_current_pos)
+ if (!must_match_at_current_pos && last_token == 0)
{
- struct mystr scan_fwd = INIT_MYSTR;
+ struct mystr last_str = INIT_MYSTR;
+ str_mid_to_end(&name_remain_str, &last_str,
+ str_getlen(&name_remain_str) - str_getlen(&s_match_needed_str));
+ locate_result = str_locate_str(&last_str, &s_match_needed_str);
+ str_free(&last_str);
- 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 )
+ if (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);
+ ret = 1;
}
- str_free(&scan_fwd);
+ goto out;
}
/* Chop matched string out of remainder */
str_mid_to_end(&name_remain_str, &temp_str,

View File

@ -2,7 +2,7 @@
Name: vsftpd Name: vsftpd
Version: 2.2.0 Version: 2.2.0
Release: 2%{?dist} Release: 3%{?dist}
Summary: Very Secure Ftp Daemon Summary: Very Secure Ftp Daemon
Group: System Environment/Daemons Group: System Environment/Daemons
@ -49,6 +49,7 @@ Patch9: vsftpd-2.1.0-userlist_log.patch
Patch10: vsftpd-2.1.0-trim.patch Patch10: vsftpd-2.1.0-trim.patch
Patch12: vsftpd-2.1.1-daemonize_plus.patch Patch12: vsftpd-2.1.1-daemonize_plus.patch
Patch13: vsftpd-2.2.0-openssl.patch Patch13: vsftpd-2.2.0-openssl.patch
Patch14: vsftpd-2.2.0-wildchar.patch
%description %description
vsftpd is a Very Secure FTP daemon. It was written completely from vsftpd is a Very Secure FTP daemon. It was written completely from
@ -73,6 +74,7 @@ cp %{SOURCE1} .
%patch10 -p1 -b .trim %patch10 -p1 -b .trim
%patch12 -p1 -b .daemonize_plus %patch12 -p1 -b .daemonize_plus
%patch13 -p1 -b .openssl %patch13 -p1 -b .openssl
%patch14 -p1 -b .wildchar
%build %build
%ifarch s390x sparcv9 sparc64 %ifarch s390x sparcv9 sparc64
@ -137,6 +139,9 @@ fi
%changelog %changelog
* Tue Sep 08 2009 Jiri Skala <jskala@rehat.com> - 2.2.0-3
- fixed bug messaged in RHEL-4 #479774 - Wildcard failures with vsftpd
* Thu Aug 27 2009 Tomas Mraz <tmraz@redhat.com> - 2.2.0-2 * Thu Aug 27 2009 Tomas Mraz <tmraz@redhat.com> - 2.2.0-2
- rebuilt with new openssl - rebuilt with new openssl