SHA256
1
0
forked from pool/vsftpd

- Update patch bit more for sanity checks. Done by rsassu@suse.de:

* vsftpd-path-normalize.patch

OBS-URL: https://build.opensuse.org/package/show/network/vsftpd?expand=0&rev=79
This commit is contained in:
Tomáš Chvátal 2015-03-25 10:08:56 +00:00 committed by Git OBS Bridge
parent 6cd1b030f0
commit ef6c0131cb
2 changed files with 17 additions and 3 deletions

View File

@ -28,7 +28,7 @@ Index: vsftpd-3.0.2/str.c
/* Ick. Its for die() */
#include "utility.h"
#include "sysutil.h"
@@ -781,3 +787,52 @@ str_basename (struct mystr* d_str, const
@@ -781,3 +787,60 @@ str_basename (struct mystr* d_str, const
if (str_isempty(d_str))
str_copy (d_str, path);
}
@ -44,8 +44,16 @@ Index: vsftpd-3.0.2/str.c
+
+ /* normalize filepath */
+ path = str_strdup(filepath);
+ if (path == NULL)
+ {
+ return;
+ }
+ char *ch1 = strdup(path);
+ char *ch2 = strdup(path);
+ if (ch1 == NULL || ch2 == NULL)
+ {
+ goto out;
+ }
+ /* we split dir/file as realpath /home/REGEXP is NULL so we need dir
+ * dir only to function correctly, later on we need to glue back the
+ * file if there is some
@ -74,12 +82,12 @@ Index: vsftpd-3.0.2/str.c
+ * needed /home<REGEXP>.
+ */
+ str_copy(filepath, &tmp);
+out:
+ free(normdir);
+ str_free(&tmp);
+out:
+ free(path);
+ free(ch1);
+ free(ch2);
+ str_free(&tmp);
+}
Index: vsftpd-3.0.2/str.h
===================================================================

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Mar 25 10:08:03 UTC 2015 - tchvatal@suse.com
- Update patch bit more for sanity checks. Done by rsassu@suse.de:
* vsftpd-path-normalize.patch
-------------------------------------------------------------------
Mon Mar 23 20:13:51 UTC 2015 - tchvatal@suse.com