Hello community,

here is the log from the commit of package vsftpd for openSUSE:Factory checked 
in at 2015-01-08 23:20:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/vsftpd (Old)
 and      /work/SRC/openSUSE:Factory/.vsftpd.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "vsftpd"

Changes:
--------
--- /work/SRC/openSUSE:Factory/vsftpd/vsftpd.changes    2014-11-24 
11:11:19.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.vsftpd.new/vsftpd.changes       2015-01-09 
01:11:17.000000000 +0100
@@ -1,0 +2,7 @@
+Fri Jan  2 10:32:53 UTC 2015 - [email protected]
+
+- Try to fix deny_file parsing to do more what is expected. Taken
+  from fedora. bnc#900326
+  * vsftpd-2.1.0-filter.patch
+
+-------------------------------------------------------------------

New:
----
  vsftpd-2.1.0-filter.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ vsftpd.spec ++++++
--- /var/tmp/diff_new_pack.BZ0FnO/_old  2015-01-09 01:11:18.000000000 +0100
+++ /var/tmp/diff_new_pack.BZ0FnO/_new  2015-01-09 01:11:18.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package vsftpd
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -58,6 +58,8 @@
 Patch17:        vsftpd-enable-gettimeofday-sec.patch
 #PATCH-FIX-UPSTREAM: bnc#890469 fix broken syscall on s390
 Patch18:        vsftpd-3.0.2-s390.patch
+#PATCH-FIX-UPSTREAM: bnc#900326 deny_file filtering acts weirdly
+Patch19:        vsftpd-2.1.0-filter.patch
 BuildRequires:  libcap-devel
 BuildRequires:  openssl-devel
 BuildRequires:  pam-devel
@@ -98,6 +100,7 @@
 %patch16 -p1
 %patch17 -p1
 %patch18 -p1
+%patch19 -p1
 
 %build
 %define seccomp_opts -D_GNU_SOURCE -DUSE_SECCOMP

++++++ vsftpd-2.1.0-filter.patch ++++++
diff -up vsftpd-2.1.0/ls.c.filter vsftpd-2.1.0/ls.c
--- vsftpd-2.1.0/ls.c.filter    2008-02-02 02:30:41.000000000 +0100
+++ vsftpd-2.1.0/ls.c   2009-01-08 19:31:15.000000000 +0100
@@ -239,9 +239,31 @@ vsf_filename_passes_filter(const struct 
   int ret = 0;
   char last_token = 0;
   int must_match_at_current_pos = 1;
+  
+  
   str_copy(&filter_remain_str, p_filter_str);
-  str_copy(&name_remain_str, p_filename_str);
-
+  
+  if (!str_isempty (&filter_remain_str) && !str_isempty(p_filename_str)) {
+    if (str_get_char_at(p_filter_str, 0) == '/') {
+      if (str_get_char_at(p_filename_str, 0) != '/') {
+        str_getcwd (&name_remain_str);
+     
+        if (str_getlen(&name_remain_str) > 1) /* cwd != root dir */
+          str_append_char (&name_remain_str, '/');
+          
+        str_append_str (&name_remain_str, p_filename_str);
+      }
+      else
+       str_copy (&name_remain_str, p_filename_str);
+    } else {
+      if (str_get_char_at(p_filter_str, 0) != '{')
+        str_basename (&name_remain_str, p_filename_str);
+      else
+        str_copy (&name_remain_str, p_filename_str);
+    }
+  } else
+    str_copy(&name_remain_str, p_filename_str);
+  
   while (!str_isempty(&filter_remain_str) && *iters < VSFTP_MATCHITERS_MAX)
   {
     static struct mystr s_match_needed_str;
diff -up vsftpd-2.1.0/str.c.filter vsftpd-2.1.0/str.c
--- vsftpd-2.1.0/str.c.filter   2008-12-17 06:54:16.000000000 +0100
+++ vsftpd-2.1.0/str.c  2009-01-08 19:31:15.000000000 +0100
@@ -680,3 +680,14 @@ str_replace_unprintable(struct mystr* p_
   }
 }
 
+void
+str_basename (struct mystr* d_str, const struct mystr* path)
+{
+  static struct mystr tmp;
+
+  str_copy (&tmp, path);
+  str_split_char_reverse(&tmp, d_str, '/');
+
+  if (str_isempty(d_str))
+   str_copy (d_str, path);
+}
diff -up vsftpd-2.1.0/str.h.filter vsftpd-2.1.0/str.h
--- vsftpd-2.1.0/str.h.filter   2008-12-17 06:53:23.000000000 +0100
+++ vsftpd-2.1.0/str.h  2009-01-08 19:32:14.000000000 +0100
@@ -100,6 +100,7 @@ void str_replace_unprintable(struct myst
 int str_atoi(const struct mystr* p_str);
 filesize_t str_a_to_filesize_t(const struct mystr* p_str);
 unsigned int str_octal_to_uint(const struct mystr* p_str);
+void str_basename (struct mystr* d_str, const struct mystr* path);
 
 /* PURPOSE: Extract a line of text (delimited by \n or EOF) from a string
  * buffer, starting at character position 'p_pos'. The extracted line will


-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to