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:
parent
6cd1b030f0
commit
ef6c0131cb
@ -28,7 +28,7 @@ Index: vsftpd-3.0.2/str.c
|
|||||||
/* Ick. Its for die() */
|
/* Ick. Its for die() */
|
||||||
#include "utility.h"
|
#include "utility.h"
|
||||||
#include "sysutil.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))
|
if (str_isempty(d_str))
|
||||||
str_copy (d_str, path);
|
str_copy (d_str, path);
|
||||||
}
|
}
|
||||||
@ -44,8 +44,16 @@ Index: vsftpd-3.0.2/str.c
|
|||||||
+
|
+
|
||||||
+ /* normalize filepath */
|
+ /* normalize filepath */
|
||||||
+ path = str_strdup(filepath);
|
+ path = str_strdup(filepath);
|
||||||
|
+ if (path == NULL)
|
||||||
|
+ {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
+ char *ch1 = strdup(path);
|
+ char *ch1 = strdup(path);
|
||||||
+ char *ch2 = 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
|
+ /* 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
|
+ * dir only to function correctly, later on we need to glue back the
|
||||||
+ * file if there is some
|
+ * file if there is some
|
||||||
@ -74,12 +82,12 @@ Index: vsftpd-3.0.2/str.c
|
|||||||
+ * needed /home<REGEXP>.
|
+ * needed /home<REGEXP>.
|
||||||
+ */
|
+ */
|
||||||
+ str_copy(filepath, &tmp);
|
+ str_copy(filepath, &tmp);
|
||||||
+out:
|
|
||||||
+ free(normdir);
|
+ free(normdir);
|
||||||
|
+ str_free(&tmp);
|
||||||
|
+out:
|
||||||
+ free(path);
|
+ free(path);
|
||||||
+ free(ch1);
|
+ free(ch1);
|
||||||
+ free(ch2);
|
+ free(ch2);
|
||||||
+ str_free(&tmp);
|
|
||||||
+}
|
+}
|
||||||
Index: vsftpd-3.0.2/str.h
|
Index: vsftpd-3.0.2/str.h
|
||||||
===================================================================
|
===================================================================
|
||||||
|
@ -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
|
Mon Mar 23 20:13:51 UTC 2015 - tchvatal@suse.com
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user