diff options
author | Koen Kooi <koen@dominion.thruhere.net> | 2012-02-22 12:22:49 +0100 |
---|---|---|
committer | Koen Kooi <koen@dominion.thruhere.net> | 2012-02-22 12:22:49 +0100 |
commit | a09b3ed3e12361b8e1cee138fcbe75b52fc506b9 (patch) | |
tree | e4794bf85364b992b5e58c6844be314193a7e8fa | |
parent | f89d930201725d0427b0c1e881cff929c5a8ef7e (diff) | |
download | meta-openembedded-a09b3ed3e12361b8e1cee138fcbe75b52fc506b9.tar.gz |
Revert "vsftpd: add new package"
wrong patch picked up from patchwork
This reverts commit f89d930201725d0427b0c1e881cff929c5a8ef7e.
-rw-r--r-- | vsftpd/01-builddefs.patch | 18 | ||||
-rw-r--r-- | vsftpd/02-config.patch | 120 | ||||
-rw-r--r-- | vsftpd/03-db-doc.patch | 19 | ||||
-rw-r--r-- | vsftpd/04-link-local.patch | 91 | ||||
-rw-r--r-- | vsftpd/05-whitespaces.patch | 81 | ||||
-rw-r--r-- | vsftpd/06-greedy.patch | 32 | ||||
-rw-r--r-- | vsftpd/07-utf8.patch | 58 | ||||
-rw-r--r-- | vsftpd/08-manpage.patch | 23 | ||||
-rw-r--r-- | vsftpd/09-s390.patch | 15 | ||||
-rw-r--r-- | vsftpd/10-remote-dos.patch | 69 | ||||
-rw-r--r-- | vsftpd/vsftpd.conf | 105 | ||||
-rw-r--r-- | vsftpd/vsftpd.xinetd.in | 7 | ||||
-rw-r--r-- | vsftpd_2.3.5.bb | 95 |
13 files changed, 0 insertions, 733 deletions
diff --git a/vsftpd/01-builddefs.patch b/vsftpd/01-builddefs.patch deleted file mode 100644 index a757d990bf..0000000000 --- a/vsftpd/01-builddefs.patch +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | Author: Daniel Jacobowitz <dan@debian.org> | ||
2 | Description: Build with tcpwrapper and SSL support. | ||
3 | |||
4 | diff -Naurp vsftpd.orig/builddefs.h vsftpd/builddefs.h | ||
5 | --- vsftpd.orig/builddefs.h 2009-01-31 00:02:36.000000000 +0000 | ||
6 | +++ vsftpd/builddefs.h 2009-01-31 00:26:34.000000000 +0000 | ||
7 | @@ -1,9 +1,9 @@ | ||
8 | #ifndef VSF_BUILDDEFS_H | ||
9 | #define VSF_BUILDDEFS_H | ||
10 | |||
11 | -#undef VSF_BUILD_TCPWRAPPERS | ||
12 | +#define VSF_BUILD_TCPWRAPPERS 1 | ||
13 | #define VSF_BUILD_PAM | ||
14 | -#undef VSF_BUILD_SSL | ||
15 | +#define VSF_BUILD_SSL | ||
16 | |||
17 | #endif /* VSF_BUILDDEFS_H */ | ||
18 | |||
diff --git a/vsftpd/02-config.patch b/vsftpd/02-config.patch deleted file mode 100644 index 6d7965d02f..0000000000 --- a/vsftpd/02-config.patch +++ /dev/null | |||
@@ -1,120 +0,0 @@ | |||
1 | Author: Daniel Jacobowitz <dan@debian.org> | ||
2 | Description: Set default configuration. | ||
3 | |||
4 | diff -Naurp vsftpd.orig/tunables.c vsftpd/tunables.c | ||
5 | --- vsftpd.orig/tunables.c 2009-07-15 22:08:27.000000000 +0200 | ||
6 | +++ vsftpd/tunables.c 2009-11-06 13:33:34.000000000 +0100 | ||
7 | @@ -246,7 +246,7 @@ tunables_load_defaults() | ||
8 | /* -rw------- */ | ||
9 | tunable_chown_upload_mode = 0600; | ||
10 | |||
11 | - install_str_setting("/usr/share/empty", &tunable_secure_chroot_dir); | ||
12 | + install_str_setting("/var/run/vsftpd/empty", &tunable_secure_chroot_dir); | ||
13 | install_str_setting("ftp", &tunable_ftp_username); | ||
14 | install_str_setting("root", &tunable_chown_username); | ||
15 | install_str_setting("/var/log/xferlog", &tunable_xferlog_file); | ||
16 | @@ -256,7 +256,7 @@ tunables_load_defaults() | ||
17 | install_str_setting(0, &tunable_ftpd_banner); | ||
18 | install_str_setting("/etc/vsftpd.banned_emails", &tunable_banned_email_file); | ||
19 | install_str_setting("/etc/vsftpd.chroot_list", &tunable_chroot_list_file); | ||
20 | - install_str_setting("ftp", &tunable_pam_service_name); | ||
21 | + install_str_setting("vsftpd", &tunable_pam_service_name); | ||
22 | install_str_setting("ftp", &tunable_guest_username); | ||
23 | install_str_setting("/etc/vsftpd.user_list", &tunable_userlist_file); | ||
24 | install_str_setting(0, &tunable_anon_root); | ||
25 | diff -Naurp vsftpd.orig/vsftpd.conf vsftpd/vsftpd.conf | ||
26 | --- vsftpd.orig/vsftpd.conf 2009-11-06 08:41:11.000000000 +0100 | ||
27 | +++ vsftpd/vsftpd.conf 2009-11-06 13:35:37.000000000 +0100 | ||
28 | @@ -8,6 +8,17 @@ | ||
29 | # Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's | ||
30 | # capabilities. | ||
31 | # | ||
32 | +# | ||
33 | +# Run standalone? vsftpd can run either from an inetd or as a standalone | ||
34 | +# daemon started from an initscript. | ||
35 | +listen=YES | ||
36 | +# | ||
37 | +# Run standalone with IPv6? | ||
38 | +# Like the listen parameter, except vsftpd will listen on an IPv6 socket | ||
39 | +# instead of an IPv4 one. This parameter and the listen parameter are mutually | ||
40 | +# exclusive. | ||
41 | +#listen_ipv6=YES | ||
42 | +# | ||
43 | # Allow anonymous FTP? (Beware - allowed by default if you comment this out). | ||
44 | anonymous_enable=YES | ||
45 | # | ||
46 | @@ -34,6 +45,12 @@ anonymous_enable=YES | ||
47 | # go into a certain directory. | ||
48 | dirmessage_enable=YES | ||
49 | # | ||
50 | +# If enabled, vsftpd will display directory listings with the time | ||
51 | +# in your local time zone. The default is to display GMT. The | ||
52 | +# times returned by the MDTM FTP command are also affected by this | ||
53 | +# option. | ||
54 | +use_localtime=YES | ||
55 | +# | ||
56 | # Activate logging of uploads/downloads. | ||
57 | xferlog_enable=YES | ||
58 | # | ||
59 | @@ -89,6 +106,11 @@ connect_from_port_20=YES | ||
60 | # (default follows) | ||
61 | #banned_email_file=/etc/vsftpd.banned_emails | ||
62 | # | ||
63 | +# You may restrict local users to their home directories. See the FAQ for | ||
64 | +# the possible risks in this before using chroot_local_user or | ||
65 | +# chroot_list_enable below. | ||
66 | +#chroot_local_user=YES | ||
67 | +# | ||
68 | # You may specify an explicit list of local users to chroot() to their home | ||
69 | # directory. If chroot_local_user is YES, then this list becomes a list of | ||
70 | # users to NOT chroot(). | ||
71 | @@ -103,12 +125,20 @@ connect_from_port_20=YES | ||
72 | # the presence of the "-R" option, so there is a strong case for enabling it. | ||
73 | #ls_recurse_enable=YES | ||
74 | # | ||
75 | -# When "listen" directive is enabled, vsftpd runs in standalone mode and | ||
76 | -# listens on IPv4 sockets. This directive cannot be used in conjunction | ||
77 | -# with the listen_ipv6 directive. | ||
78 | -listen=YES | ||
79 | +# Customization | ||
80 | # | ||
81 | -# This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6 | ||
82 | -# sockets, you must run two copies of vsftpd with two configuration files. | ||
83 | -# Make sure, that one of the listen options is commented !! | ||
84 | -#listen_ipv6=YES | ||
85 | +# Some of vsftpd's settings don't fit the filesystem layout by | ||
86 | +# default. | ||
87 | +# | ||
88 | +# This option should be the name of a directory which is empty. Also, the | ||
89 | +# directory should not be writable by the ftp user. This directory is used | ||
90 | +# as a secure chroot() jail at times vsftpd does not require filesystem | ||
91 | +# access. | ||
92 | +secure_chroot_dir=/var/run/vsftpd/empty | ||
93 | +# | ||
94 | +# This string is the name of the PAM service vsftpd will use. | ||
95 | +pam_service_name=vsftpd | ||
96 | +# | ||
97 | +# This option specifies the location of the RSA certificate to use for SSL | ||
98 | +# encrypted connections. | ||
99 | +rsa_cert_file=/etc/ssl/private/vsftpd.pem | ||
100 | diff -Naurp vsftpd.orig/vsftpd.conf.5 vsftpd/vsftpd.conf.5 | ||
101 | --- vsftpd.orig/vsftpd.conf.5 2009-11-06 08:41:11.000000000 +0100 | ||
102 | +++ vsftpd/vsftpd.conf.5 2009-11-06 13:37:10.000000000 +0100 | ||
103 | @@ -940,7 +940,7 @@ Default: nobody | ||
104 | .B pam_service_name | ||
105 | This string is the name of the PAM service vsftpd will use. | ||
106 | |||
107 | -Default: ftp | ||
108 | +Default: vsftpd | ||
109 | .TP | ||
110 | .B pasv_address | ||
111 | Use this option to override the IP address that vsftpd will advertise in | ||
112 | @@ -969,7 +969,7 @@ This option should be the name of a dire | ||
113 | directory should not be writable by the ftp user. This directory is used | ||
114 | as a secure chroot() jail at times vsftpd does not require filesystem access. | ||
115 | |||
116 | -Default: /usr/share/empty | ||
117 | +Default: /var/run/vsftpd/empty | ||
118 | .TP | ||
119 | .B ssl_ciphers | ||
120 | This option can be used to select which SSL ciphers vsftpd will allow for | ||
diff --git a/vsftpd/03-db-doc.patch b/vsftpd/03-db-doc.patch deleted file mode 100644 index d544ef0c1a..0000000000 --- a/vsftpd/03-db-doc.patch +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | Author: shaul Karl <shaulkarl@yahoo.com> | ||
2 | Description: | ||
3 | A short explanation how to find out the right db version (Closes: #478282). | ||
4 | |||
5 | diff -Naurp vsftpd.orig/EXAMPLE/VIRTUAL_USERS/README vsftpd/EXAMPLE/VIRTUAL_USERS/README | ||
6 | --- vsftpd.orig/EXAMPLE/VIRTUAL_USERS/README 2009-01-31 00:02:36.000000000 +0000 | ||
7 | +++ vsftpd/EXAMPLE/VIRTUAL_USERS/README 2009-01-31 01:38:11.000000000 +0000 | ||
8 | @@ -21,7 +21,10 @@ NOTE: Many systems have multiple version | ||
9 | need to use e.g. db3_load for correct operation. This is known to affect | ||
10 | some Debian systems. The core issue is that pam_userdb expects its login | ||
11 | database to be a specific db version (often db3, whereas db4 may be installed | ||
12 | -on your system). | ||
13 | +on your system). You might check ahead what specific db version you'll need | ||
14 | +by looking at the dependcies of the pam module. Some methods to do that is to | ||
15 | +run ldd on the pam_userdb.so or look at the dependencies of the package with | ||
16 | +the pam modules. | ||
17 | |||
18 | This will create /etc/vsftpd_login.db. Obviously, you may want to make sure | ||
19 | the permissions are restricted: | ||
diff --git a/vsftpd/04-link-local.patch b/vsftpd/04-link-local.patch deleted file mode 100644 index 53b3735610..0000000000 --- a/vsftpd/04-link-local.patch +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | Author: Michael Stapelberg <michael@stapelberg.de> | ||
2 | Description: | ||
3 | vsftpd does not accept IPv6 scope identifier in listen_address6 | ||
4 | (Closes: #544993). | ||
5 | . | ||
6 | When specifying a link-local address, you need a scope identifier (tha name of | ||
7 | the index usually), thus you cannot use the following: | ||
8 | listen_address6=fe80::21f:16ff:fe06:3aab | ||
9 | but you have to use: | ||
10 | listen_address6=fe80::21f:16ff:fe06:3aab%eth0 | ||
11 | so that it is clear on which interface this link-local address should be used. | ||
12 | . | ||
13 | Unfortunately, vsftpd does not correctly parse the address mentioned above and | ||
14 | thus fails to be useful in link-local-only environments. | ||
15 | . | ||
16 | This patch fixes it. | ||
17 | |||
18 | diff -Naurp vsftpd.orig/standalone.c vsftpd/standalone.c | ||
19 | --- vsftpd.orig/standalone.c 2009-10-02 14:15:18.000000000 +0200 | ||
20 | +++ vsftpd/standalone.c 2009-10-17 17:10:02.000000000 +0200 | ||
21 | @@ -7,6 +7,8 @@ | ||
22 | * Code to listen on the network and launch children servants. | ||
23 | */ | ||
24 | |||
25 | +#include <net/if.h> | ||
26 | + | ||
27 | #include "standalone.h" | ||
28 | |||
29 | #include "parseconf.h" | ||
30 | @@ -111,8 +113,17 @@ vsf_standalone_main(void) | ||
31 | else | ||
32 | { | ||
33 | struct mystr addr_str = INIT_MYSTR; | ||
34 | + struct mystr scope_id = INIT_MYSTR; | ||
35 | const unsigned char* p_raw_addr; | ||
36 | + unsigned int if_index = 0; | ||
37 | + | ||
38 | + /* See if we got a scope id */ | ||
39 | str_alloc_text(&addr_str, tunable_listen_address6); | ||
40 | + str_split_char(&addr_str, &scope_id, '%'); | ||
41 | + if (str_getlen(&scope_id) > 0) { | ||
42 | + if_index = if_nametoindex(str_getbuf(&scope_id)); | ||
43 | + str_free(&scope_id); | ||
44 | + } | ||
45 | p_raw_addr = vsf_sysutil_parse_ipv6(&addr_str); | ||
46 | str_free(&addr_str); | ||
47 | if (!p_raw_addr) | ||
48 | @@ -120,6 +131,7 @@ vsf_standalone_main(void) | ||
49 | die2("bad listen_address6: ", tunable_listen_address6); | ||
50 | } | ||
51 | vsf_sysutil_sockaddr_set_ipv6addr(p_sockaddr, p_raw_addr); | ||
52 | + vsf_sysutil_sockaddr_set_ipv6scope(p_sockaddr, if_index); | ||
53 | } | ||
54 | retval = vsf_sysutil_bind(listen_sock, p_sockaddr); | ||
55 | vsf_sysutil_free(p_sockaddr); | ||
56 | diff -Naurp vsftpd.orig/sysutil.c vsftpd/sysutil.c | ||
57 | --- vsftpd.orig/sysutil.c 2009-10-02 14:15:18.000000000 +0200 | ||
58 | +++ vsftpd/sysutil.c 2009-10-17 17:10:02.000000000 +0200 | ||
59 | @@ -2039,6 +2039,19 @@ vsf_sysutil_sockaddr_set_ipv6addr(struct | ||
60 | } | ||
61 | } | ||
62 | |||
63 | +int | ||
64 | +vsf_sysutil_sockaddr_get_ipv6scope(struct vsf_sysutil_sockaddr* p_sockptr) | ||
65 | +{ | ||
66 | + return p_sockptr->u.u_sockaddr_in6.sin6_scope_id; | ||
67 | +} | ||
68 | + | ||
69 | +void | ||
70 | +vsf_sysutil_sockaddr_set_ipv6scope(struct vsf_sysutil_sockaddr* p_sockptr, | ||
71 | + const int scope_id) | ||
72 | +{ | ||
73 | + p_sockptr->u.u_sockaddr_in6.sin6_scope_id = scope_id; | ||
74 | +} | ||
75 | + | ||
76 | const void* | ||
77 | vsf_sysutil_sockaddr_ipv6_v4(const struct vsf_sysutil_sockaddr* p_addr) | ||
78 | { | ||
79 | diff -Naurp vsftpd.orig/sysutil.h vsftpd/sysutil.h | ||
80 | --- vsftpd.orig/sysutil.h 2009-10-02 14:15:18.000000000 +0200 | ||
81 | +++ vsftpd/sysutil.h 2009-10-17 17:10:02.000000000 +0200 | ||
82 | @@ -228,6 +228,9 @@ void vsf_sysutil_sockaddr_set_ipv4addr(s | ||
83 | const unsigned char* p_raw); | ||
84 | void vsf_sysutil_sockaddr_set_ipv6addr(struct vsf_sysutil_sockaddr* p_sockptr, | ||
85 | const unsigned char* p_raw); | ||
86 | +void vsf_sysutil_sockaddr_set_ipv6scope(struct vsf_sysutil_sockaddr* p_sockptr, | ||
87 | + const int scope_id); | ||
88 | +int vsf_sysutil_sockaddr_get_ipv6scope(struct vsf_sysutil_sockaddr* p_sockptr); | ||
89 | void vsf_sysutil_sockaddr_set_any(struct vsf_sysutil_sockaddr* p_sockaddr); | ||
90 | unsigned short vsf_sysutil_sockaddr_get_port( | ||
91 | const struct vsf_sysutil_sockaddr* p_sockptr); | ||
diff --git a/vsftpd/05-whitespaces.patch b/vsftpd/05-whitespaces.patch deleted file mode 100644 index 569ce38ed4..0000000000 --- a/vsftpd/05-whitespaces.patch +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | Author: Jiri Skala <jskala@redhat.com> | ||
2 | Description: trim white spaces from option values (Closes: #419857, #536803). | ||
3 | |||
4 | diff -Naurp vsftpd.orig/parseconf.c vsftpd/parseconf.c | ||
5 | --- vsftpd.orig/parseconf.c 2009-10-02 14:15:18.000000000 +0200 | ||
6 | +++ vsftpd/parseconf.c 2009-10-18 11:28:31.000000000 +0200 | ||
7 | @@ -275,7 +275,7 @@ vsf_parseconf_load_setting(const char* p | ||
8 | } | ||
9 | else | ||
10 | { | ||
11 | - *p_curr_setting = str_strdup(&s_value_str); | ||
12 | + *p_curr_setting = str_strdup_trimmed(&s_value_str); | ||
13 | } | ||
14 | return; | ||
15 | } | ||
16 | diff -Naurp vsftpd.orig/str.c vsftpd/str.c | ||
17 | --- vsftpd.orig/str.c 2009-10-02 14:15:18.000000000 +0200 | ||
18 | +++ vsftpd/str.c 2009-10-18 11:28:31.000000000 +0200 | ||
19 | @@ -89,6 +89,18 @@ str_strdup(const struct mystr* p_str) | ||
20 | return vsf_sysutil_strdup(str_getbuf(p_str)); | ||
21 | } | ||
22 | |||
23 | +const char* | ||
24 | +str_strdup_trimmed(const struct mystr* p_str) | ||
25 | +{ | ||
26 | + const char* p_trimmed = str_getbuf(p_str); | ||
27 | + int h, t, newlen; | ||
28 | + | ||
29 | + for (h = 0; h < (int)str_getlen(p_str) && vsf_sysutil_isspace(p_trimmed[h]); h++) ; | ||
30 | + for (t = str_getlen(p_str) - 1; t >= 0 && vsf_sysutil_isspace(p_trimmed[t]); t--) ; | ||
31 | + newlen = t - h + 1; | ||
32 | + return newlen ? vsf_sysutil_strndup(p_trimmed+h, (unsigned int)newlen) : 0L; | ||
33 | +} | ||
34 | + | ||
35 | void | ||
36 | str_alloc_alt_term(struct mystr* p_str, const char* p_src, char term) | ||
37 | { | ||
38 | diff -Naurp vsftpd.orig/str.h vsftpd/str.h | ||
39 | --- vsftpd.orig/str.h 2009-10-02 14:15:18.000000000 +0200 | ||
40 | +++ vsftpd/str.h 2009-10-18 11:28:31.000000000 +0200 | ||
41 | @@ -31,6 +31,7 @@ void str_alloc_ulong(struct mystr* p_str | ||
42 | void str_alloc_filesize_t(struct mystr* p_str, filesize_t the_filesize); | ||
43 | void str_copy(struct mystr* p_dest, const struct mystr* p_src); | ||
44 | const char* str_strdup(const struct mystr* p_str); | ||
45 | +const char* str_strdup_trimmed(const struct mystr* p_str); | ||
46 | void str_empty(struct mystr* p_str); | ||
47 | void str_free(struct mystr* p_str); | ||
48 | void str_trunc(struct mystr* p_str, unsigned int trunc_len); | ||
49 | diff -Naurp vsftpd.orig/sysutil.c vsftpd/sysutil.c | ||
50 | --- vsftpd.orig/sysutil.c 2009-10-02 14:15:18.000000000 +0200 | ||
51 | +++ vsftpd/sysutil.c 2009-10-18 11:28:31.000000000 +0200 | ||
52 | @@ -1033,6 +1033,18 @@ vsf_sysutil_strdup(const char* p_str) | ||
53 | return strdup(p_str); | ||
54 | } | ||
55 | |||
56 | +char* | ||
57 | +vsf_sysutil_strndup(const char* p_str, unsigned int p_len) | ||
58 | +{ | ||
59 | + char *new = (char *)malloc(p_len+1); | ||
60 | + | ||
61 | + if (new == NULL) | ||
62 | + return NULL; | ||
63 | + | ||
64 | + new[p_len]='\0'; | ||
65 | + return (char *)memcpy(new, p_str, p_len); | ||
66 | +} | ||
67 | + | ||
68 | void | ||
69 | vsf_sysutil_memclr(void* p_dest, unsigned int size) | ||
70 | { | ||
71 | diff -Naurp vsftpd.orig/sysutil.h vsftpd/sysutil.h | ||
72 | --- vsftpd.orig/sysutil.h 2009-10-02 14:15:18.000000000 +0200 | ||
73 | +++ vsftpd/sysutil.h 2009-10-18 11:28:31.000000000 +0200 | ||
74 | @@ -186,6 +186,7 @@ int vsf_sysutil_wait_get_exitcode( | ||
75 | /* Various string functions */ | ||
76 | unsigned int vsf_sysutil_strlen(const char* p_text); | ||
77 | char* vsf_sysutil_strdup(const char* p_str); | ||
78 | +char* vsf_sysutil_strndup(const char* p_str, unsigned int p_len); | ||
79 | void vsf_sysutil_memclr(void* p_dest, unsigned int size); | ||
80 | void vsf_sysutil_memcpy(void* p_dest, const void* p_src, | ||
81 | const unsigned int size); | ||
diff --git a/vsftpd/06-greedy.patch b/vsftpd/06-greedy.patch deleted file mode 100644 index ff73c9c285..0000000000 --- a/vsftpd/06-greedy.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | Author: Martin Nagy <mnagy@redhat.com> | ||
2 | Description: Fix file listing issue with wildcard (Bugzilla: #392181). | ||
3 | |||
4 | diff -Naurp vsftpd.orig/ls.c vsftpd/ls.c | ||
5 | --- vsftpd.orig/ls.c 2009-10-02 14:15:18.000000000 +0200 | ||
6 | +++ vsftpd/ls.c 2009-10-18 11:48:29.000000000 +0200 | ||
7 | @@ -281,6 +281,25 @@ vsf_filename_passes_filter(const struct | ||
8 | { | ||
9 | goto out; | ||
10 | } | ||
11 | + if (!must_match_at_current_pos) | ||
12 | + { | ||
13 | + struct mystr scan_fwd = INIT_MYSTR; | ||
14 | + | ||
15 | + str_mid_to_end(&name_remain_str, &scan_fwd, | ||
16 | + indexx + str_getlen(&s_match_needed_str)); | ||
17 | + /* We're allowed to be greedy, test if it match further along | ||
18 | + * keep advancing indexx while we can still match. | ||
19 | + */ | ||
20 | + while( (locate_result = str_locate_str(&scan_fwd, &s_match_needed_str)), | ||
21 | + locate_result.found ) | ||
22 | + { | ||
23 | + indexx += locate_result.index + str_getlen(&s_match_needed_str); | ||
24 | + str_mid_to_end(&scan_fwd, &temp_str, | ||
25 | + locate_result.index + str_getlen(&s_match_needed_str)); | ||
26 | + str_copy(&scan_fwd, &temp_str); | ||
27 | + } | ||
28 | + str_free(&scan_fwd); | ||
29 | + } | ||
30 | /* Chop matched string out of remainder */ | ||
31 | str_mid_to_end(&name_remain_str, &temp_str, | ||
32 | indexx + str_getlen(&s_match_needed_str)); | ||
diff --git a/vsftpd/07-utf8.patch b/vsftpd/07-utf8.patch deleted file mode 100644 index cf03e08ad3..0000000000 --- a/vsftpd/07-utf8.patch +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | Author: Chuck Short <zulcss@ubuntu.com> | ||
2 | Description: Adding support for UTF8. | ||
3 | |||
4 | diff -Naurp vsftpd.orig/features.c vsftpd/features.c | ||
5 | --- vsftpd.orig/features.c 2008-12-04 06:00:47.000000000 +0000 | ||
6 | +++ vsftpd/features.c 2010-02-25 13:28:06.000000000 +0000 | ||
7 | @@ -21,6 +21,10 @@ handle_feat(struct vsf_session* p_sess) | ||
8 | vsf_cmdio_write_raw(p_sess, " AUTH SSL\r\n"); | ||
9 | vsf_cmdio_write_raw(p_sess, " AUTH TLS\r\n"); | ||
10 | } | ||
11 | + if (tunable_utf8_filesystem) | ||
12 | + { | ||
13 | + vsf_cmdio_write_raw(p_sess, " UTF8\r\n"); | ||
14 | + } | ||
15 | if (tunable_port_enable) | ||
16 | { | ||
17 | vsf_cmdio_write_raw(p_sess, " EPRT\r\n"); | ||
18 | diff -Naurp vsftpd.orig/parseconf.c vsftpd/parseconf.c | ||
19 | --- vsftpd.orig/parseconf.c 2009-08-07 18:46:40.000000000 +0000 | ||
20 | +++ vsftpd/parseconf.c 2010-02-25 13:28:06.000000000 +0000 | ||
21 | @@ -28,6 +28,7 @@ static struct parseconf_bool_setting | ||
22 | parseconf_bool_array[] = | ||
23 | { | ||
24 | { "anonymous_enable", &tunable_anonymous_enable }, | ||
25 | + { "utf8_filesystem", &tunable_utf8_filesystem }, | ||
26 | { "local_enable", &tunable_local_enable }, | ||
27 | { "pasv_enable", &tunable_pasv_enable }, | ||
28 | { "port_enable", &tunable_port_enable }, | ||
29 | diff -Naurp vsftpd.orig/tunables.c vsftpd/tunables.c | ||
30 | --- vsftpd.orig/tunables.c 2009-07-15 20:08:27.000000000 +0000 | ||
31 | +++ vsftpd/tunables.c 2010-02-25 13:28:06.000000000 +0000 | ||
32 | @@ -10,6 +10,7 @@ | ||
33 | |||
34 | int tunable_anonymous_enable; | ||
35 | int tunable_local_enable; | ||
36 | +int tunable_utf8_filesystem; | ||
37 | int tunable_pasv_enable; | ||
38 | int tunable_port_enable; | ||
39 | int tunable_chroot_local_user; | ||
40 | @@ -146,6 +147,7 @@ tunables_load_defaults() | ||
41 | { | ||
42 | tunable_anonymous_enable = 1; | ||
43 | tunable_local_enable = 0; | ||
44 | + tunable_utf8_filesystem = 0; | ||
45 | tunable_pasv_enable = 1; | ||
46 | tunable_port_enable = 1; | ||
47 | tunable_chroot_local_user = 0; | ||
48 | diff -Naurp vsftpd.orig/tunables.h vsftpd/tunables.h | ||
49 | --- vsftpd.orig/tunables.h 2009-07-07 01:37:28.000000000 +0000 | ||
50 | +++ vsftpd/tunables.h 2010-02-25 13:28:06.000000000 +0000 | ||
51 | @@ -11,6 +11,7 @@ void tunables_load_defaults(); | ||
52 | /* Booleans */ | ||
53 | extern int tunable_anonymous_enable; /* Allow anon logins */ | ||
54 | extern int tunable_local_enable; /* Allow local logins */ | ||
55 | +extern int tunable_utf8_filesystem; /* Server uses UTF8 Filesystem */ | ||
56 | extern int tunable_pasv_enable; /* Allow PASV */ | ||
57 | extern int tunable_port_enable; /* Allow PORT */ | ||
58 | extern int tunable_chroot_local_user; /* Restrict local to home dir */ | ||
diff --git a/vsftpd/08-manpage.patch b/vsftpd/08-manpage.patch deleted file mode 100644 index 3a4f9620dc..0000000000 --- a/vsftpd/08-manpage.patch +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | Author: Daniel Baumann <daniel.baumann@progress-technologies.net> | ||
2 | Description: Fixing manpage formating. | ||
3 | |||
4 | diff -Naurp vsftpd.orig/vsftpd.8 vsftpd/vsftpd.8 | ||
5 | --- vsftpd.orig/vsftpd.8 2009-07-17 20:56:23.000000000 +0000 | ||
6 | +++ vsftpd/vsftpd.8 2010-04-08 05:18:00.000000000 +0000 | ||
7 | @@ -57,4 +57,3 @@ setting and any identical setting that w | ||
8 | .Pa /etc/vsftpd.conf | ||
9 | .Sh SEE ALSO | ||
10 | .Xr vsftpd.conf 5 | ||
11 | -.end | ||
12 | diff -Naurp vsftpd.orig/vsftpd.conf.5 vsftpd/vsftpd.conf.5 | ||
13 | --- vsftpd.orig/vsftpd.conf.5 2009-10-19 02:46:30.000000000 +0000 | ||
14 | +++ vsftpd/vsftpd.conf.5 2010-04-08 05:18:08.000000000 +0000 | ||
15 | @@ -404,7 +404,7 @@ reuse (which proves that they know the s | ||
16 | channel). Although this is a secure default, it may break many FTP clients, | ||
17 | so you may want to disable it. For a discussion of the consequences, see | ||
18 | http://scarybeastsecurity.blogspot.com/2009/02/vsftpd-210-released.html | ||
19 | -(Added in v2.1.0). | ||
20 | + (Added in v2.1.0). | ||
21 | |||
22 | Default: YES | ||
23 | .TP | ||
diff --git a/vsftpd/09-s390.patch b/vsftpd/09-s390.patch deleted file mode 100644 index 4711f9bc68..0000000000 --- a/vsftpd/09-s390.patch +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | Author: Philipp Kern <pkern@debian.org> | ||
2 | Description: Fix vsftpd on s390 (Closes: #602726). | ||
3 | |||
4 | diff -Naurp vsftpd.orig/sysdeputil.c vsftpd/sysdeputil.c | ||
5 | --- vsftpd.orig/sysdeputil.c 2011-09-05 16:03:18.728857644 +0200 | ||
6 | +++ vsftpd/sysdeputil.c 2011-09-05 16:05:12.909423834 +0200 | ||
7 | @@ -64,7 +64,7 @@ | ||
8 | #include <utmpx.h> | ||
9 | |||
10 | /* BEGIN config */ | ||
11 | -#if defined(__linux__) | ||
12 | +#if defined(__linux__) && !defined(__s390__) | ||
13 | #include <errno.h> | ||
14 | #include <syscall.h> | ||
15 | #define VSF_SYSDEP_HAVE_LINUX_CLONE | ||
diff --git a/vsftpd/10-remote-dos.patch b/vsftpd/10-remote-dos.patch deleted file mode 100644 index fee3ebe3ef..0000000000 --- a/vsftpd/10-remote-dos.patch +++ /dev/null | |||
@@ -1,69 +0,0 @@ | |||
1 | Author: Ben Hutchings <ben@decadent.org.uk> | ||
2 | Description: Remote DoS on Linux 2.6.32 (Closes: #629373). | ||
3 | |||
4 | diff -Naurp vsftpd.orig/sysdeputil.c vsftpd/sysdeputil.c | ||
5 | --- vsftpd.orig/sysdeputil.c 2010-03-26 04:25:33.000000000 +0100 | ||
6 | +++ vsftpd/sysdeputil.c 2011-09-05 15:16:05.347070790 +0200 | ||
7 | @@ -25,6 +25,11 @@ | ||
8 | #define _LARGEFILE64_SOURCE 1 | ||
9 | #endif | ||
10 | |||
11 | +#ifdef __linux__ | ||
12 | + #include <stdio.h> | ||
13 | + #include <sys/utsname.h> | ||
14 | +#endif | ||
15 | + | ||
16 | /* For INT_MAX */ | ||
17 | #include <limits.h> | ||
18 | |||
19 | @@ -1259,11 +1264,36 @@ vsf_set_term_if_parent_dies() | ||
20 | #endif | ||
21 | } | ||
22 | |||
23 | +#ifdef VSF_SYSDEP_HAVE_LINUX_CLONE | ||
24 | +/* On Linux versions <2.6.35, netns cleanup may be so slow that | ||
25 | + * creating a netns per connection allows a remote denial-of-service. | ||
26 | + * We therefore do not use CLONE_NEWNET on these versions. | ||
27 | + */ | ||
28 | +static int | ||
29 | +vsf_sysutil_netns_cleanup_is_fast(void) | ||
30 | +{ | ||
31 | +#ifdef __linux__ | ||
32 | + struct utsname utsname; | ||
33 | + int r1, r2, r3 = 0; | ||
34 | + return (uname(&utsname) == 0 && | ||
35 | + sscanf(utsname.release, "%d.%d.%d", &r1, &r2, &r3) >= 2 && | ||
36 | + ((r1 << 16) | (r2 << 8) | r3) >= ((2 << 16) | (6 << 8) | 35)); | ||
37 | +#else | ||
38 | + /* Assume any other kernel that has the feature don't have this problem */ | ||
39 | + return 1; | ||
40 | +#endif | ||
41 | +} | ||
42 | +#endif | ||
43 | + | ||
44 | int | ||
45 | vsf_sysutil_fork_isolate_all_failok() | ||
46 | { | ||
47 | #ifdef VSF_SYSDEP_HAVE_LINUX_CLONE | ||
48 | - static int cloneflags_work = 1; | ||
49 | + static int cloneflags_work = -1; | ||
50 | + if (cloneflags_work < 0) | ||
51 | + { | ||
52 | + cloneflags_work = vsf_sysutil_netns_cleanup_is_fast(); | ||
53 | + } | ||
54 | if (cloneflags_work) | ||
55 | { | ||
56 | int ret = syscall(__NR_clone, | ||
57 | @@ -1309,7 +1339,11 @@ int | ||
58 | vsf_sysutil_fork_newnet() | ||
59 | { | ||
60 | #ifdef VSF_SYSDEP_HAVE_LINUX_CLONE | ||
61 | - static int cloneflags_work = 1; | ||
62 | + static int cloneflags_work = -1; | ||
63 | + if (cloneflags_work < 0) | ||
64 | + { | ||
65 | + cloneflags_work = vsf_sysutil_netns_cleanup_is_fast(); | ||
66 | + } | ||
67 | if (cloneflags_work) | ||
68 | { | ||
69 | int ret = syscall(__NR_clone, CLONE_NEWNET | SIGCHLD, NULL); | ||
diff --git a/vsftpd/vsftpd.conf b/vsftpd/vsftpd.conf deleted file mode 100644 index 28ad4e06fc..0000000000 --- a/vsftpd/vsftpd.conf +++ /dev/null | |||
@@ -1,105 +0,0 @@ | |||
1 | # Opendreambox /etc/vsftpd.conf | ||
2 | # | ||
3 | # Please see vsftpd.conf.5 for all compiled in defaults. | ||
4 | # | ||
5 | # READ THIS: This example file is NOT an exhaustive list of vsftpd options. | ||
6 | # Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's | ||
7 | # capabilities. | ||
8 | # | ||
9 | # Allow anonymous FTP? (Beware - allowed by default if you comment this out). | ||
10 | anonymous_enable=NO | ||
11 | # | ||
12 | # Uncomment this to allow local users to log in. | ||
13 | local_enable=YES | ||
14 | # | ||
15 | # Uncomment this to enable any form of FTP write command. | ||
16 | write_enable=YES | ||
17 | # | ||
18 | # Default umask for local users is 077. You may wish to change this to 022, | ||
19 | # if your users expect that (022 is used by most other ftpd's) | ||
20 | #local_umask=022 | ||
21 | # | ||
22 | # Uncomment this to allow the anonymous FTP user to upload files. This only | ||
23 | # has an effect if the above global write enable is activated. Also, you will | ||
24 | # obviously need to create a directory writable by the FTP user. | ||
25 | #anon_upload_enable=YES | ||
26 | # | ||
27 | # Uncomment this if you want the anonymous FTP user to be able to create | ||
28 | # new directories. | ||
29 | #anon_mkdir_write_enable=YES | ||
30 | # | ||
31 | # Activate directory messages - messages given to remote users when they | ||
32 | # go into a certain directory. | ||
33 | dirmessage_enable=YES | ||
34 | # | ||
35 | # Activate logging of uploads/downloads. | ||
36 | #xferlog_enable=YES | ||
37 | # | ||
38 | # Make sure PORT transfer connections originate from port 20 (ftp-data). | ||
39 | connect_from_port_20=YES | ||
40 | # | ||
41 | # If you want, you can arrange for uploaded anonymous files to be owned by | ||
42 | # a different user. Note! Using "root" for uploaded files is not | ||
43 | # recommended! | ||
44 | #chown_uploads=YES | ||
45 | #chown_username=whoever | ||
46 | # | ||
47 | # You may override where the log file goes if you like. The default is shown | ||
48 | # below. | ||
49 | #xferlog_file=/var/log/vsftpd.log | ||
50 | # | ||
51 | # If you want, you can have your log file in standard ftpd xferlog format | ||
52 | #xferlog_std_format=YES | ||
53 | # | ||
54 | # You may change the default value for timing out an idle session. | ||
55 | #idle_session_timeout=600 | ||
56 | # | ||
57 | # You may change the default value for timing out a data connection. | ||
58 | #data_connection_timeout=120 | ||
59 | # | ||
60 | # It is recommended that you define on your system a unique user which the | ||
61 | # ftp server can use as a totally isolated and unprivileged user. | ||
62 | #nopriv_user=ftpsecure | ||
63 | # | ||
64 | # Enable this and the server will recognise asynchronous ABOR requests. Not | ||
65 | # recommended for security (the code is non-trivial). Not enabling it, | ||
66 | # however, may confuse older FTP clients. | ||
67 | async_abor_enable=YES | ||
68 | # | ||
69 | # By default the server will pretend to allow ASCII mode but in fact ignore | ||
70 | # the request. Turn on the below options to have the server actually do ASCII | ||
71 | # mangling on files when in ASCII mode. | ||
72 | # Beware that turning on ascii_download_enable enables malicious remote parties | ||
73 | # to consume your I/O resources, by issuing the command "SIZE /big/file" in | ||
74 | # ASCII mode. | ||
75 | # These ASCII options are split into upload and download because you may wish | ||
76 | # to enable ASCII uploads (to prevent uploaded scripts etc. from breaking), | ||
77 | # without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be | ||
78 | # on the client anyway.. | ||
79 | #ascii_upload_enable=YES | ||
80 | #ascii_download_enable=YES | ||
81 | # | ||
82 | # You may fully customise the login banner string: | ||
83 | ftpd_banner=Welcome to the OpenDreambox FTP service. | ||
84 | # | ||
85 | # You may specify a file of disallowed anonymous e-mail addresses. Apparently | ||
86 | # useful for combatting certain DoS attacks. | ||
87 | #deny_email_enable=YES | ||
88 | # (default follows) | ||
89 | #banned_email_file=/etc/vsftpd.banned_emails | ||
90 | # | ||
91 | # You may specify an explicit list of local users to chroot() to their home | ||
92 | # directory. If chroot_local_user is YES, then this list becomes a list of | ||
93 | # users to NOT chroot(). | ||
94 | #chroot_list_enable=YES | ||
95 | # (default follows) | ||
96 | #chroot_list_file=/etc/vsftpd.chroot_list | ||
97 | # | ||
98 | # You may activate the "-R" option to the builtin ls. This is disabled by | ||
99 | # default to avoid remote users being able to cause excessive I/O on large | ||
100 | # sites. However, some broken FTP clients such as "ncftp" and "mirror" assume | ||
101 | # the presence of the "-R" option, so there is a strong case for enabling it. | ||
102 | ls_recurse_enable=YES | ||
103 | # | ||
104 | secure_chroot_dir=/dev/shm | ||
105 | local_root=/ | ||
diff --git a/vsftpd/vsftpd.xinetd.in b/vsftpd/vsftpd.xinetd.in deleted file mode 100644 index 000f62ad72..0000000000 --- a/vsftpd/vsftpd.xinetd.in +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | service ftp | ||
2 | { | ||
3 | socket_type = stream | ||
4 | user = root | ||
5 | server = @SBINDIR@/vsftpd | ||
6 | wait = no | ||
7 | } | ||
diff --git a/vsftpd_2.3.5.bb b/vsftpd_2.3.5.bb deleted file mode 100644 index 5cd9b9d4a5..0000000000 --- a/vsftpd_2.3.5.bb +++ /dev/null | |||
@@ -1,95 +0,0 @@ | |||
1 | DESCRIPTION = "lightweight, efficient FTP server written for security" | ||
2 | HOMEPAGE = "https://security.appspot.com/vsftpd.html" | ||
3 | SECTION = "console/network" | ||
4 | LICENSE = "GPL-2.0-with-OpenSSL-exception" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=a6067ad950b28336613aed9dd47b1271" | ||
6 | DEPENDS = "libcap openssl" | ||
7 | DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | ||
8 | |||
9 | SRC_URI = " \ | ||
10 | https://security.appspot.com/downloads/${BP}.tar.gz \ | ||
11 | file://vsftpd.xinetd.in \ | ||
12 | file://01-builddefs.patch \ | ||
13 | file://02-config.patch \ | ||
14 | file://03-db-doc.patch \ | ||
15 | file://04-link-local.patch \ | ||
16 | file://05-whitespaces.patch \ | ||
17 | file://06-greedy.patch \ | ||
18 | file://07-utf8.patch \ | ||
19 | file://08-manpage.patch \ | ||
20 | file://09-s390.patch \ | ||
21 | file://10-remote-dos.patch \ | ||
22 | " | ||
23 | SRC_URI[md5sum] = "01398a5bef8e85b6cf2c213a4b011eca" | ||
24 | SRC_URI[sha256sum] = "d87ee2987df8f03e1dbe294905f7907b2798deb89c67ca965f6e2f60879e54f1" | ||
25 | |||
26 | S = "${WORKDIR}/${BP}" | ||
27 | |||
28 | inherit useradd | ||
29 | |||
30 | CFLAGS = "${TARGET_CFLAGS}" | ||
31 | CFLAGS += "-DVSF_BUILD_SSL=1" | ||
32 | CFLAGS += "${@base_contains('DISTRO_FEATURES', 'pam', '-DVSF_BUILD_PAM=1', '', d)}" | ||
33 | |||
34 | LIBS = "-lcap -lcrypt -lssl -lcrypto" | ||
35 | LIBS += "${@base_contains('DISTRO_FEATURES', 'pam', '-lpam', '', d)}" | ||
36 | |||
37 | LINK = "${TARGET_LDFLAGS}" | ||
38 | |||
39 | SECURE_CHROOT_DIR = "${datadir}/${BPN}/chroot" | ||
40 | RSA_CERT_FILE = "${sysconfdir}/ssl/private/${BPN}.pem" | ||
41 | |||
42 | do_configure() { | ||
43 | rm -f builddefs.h | ||
44 | touch builddefs.h | ||
45 | set_default() { | ||
46 | NAME=$1 | ||
47 | VALUE=$2 | ||
48 | sed -e "s,^#\?${NAME}=.*,${NAME}=${VALUE}," -i vsftpd.conf | ||
49 | } | ||
50 | set_default listen NO | ||
51 | set_default listen_ipv6 NO | ||
52 | set_default anonymous_enable NO | ||
53 | set_default local_enable YES | ||
54 | set_default write_enable YES | ||
55 | set_default anon_upload_enable NO | ||
56 | set_default anon_mkdir_write_enable NO | ||
57 | set_default dirmessage_enable NO | ||
58 | set_default use_localtime YES | ||
59 | set_default xferlog_enable NO | ||
60 | set_default connect_from_port_20 YES | ||
61 | set_default chown_uploads NO | ||
62 | set_default nopriv_user vsftpd | ||
63 | set_default async_abor_enable YES | ||
64 | set_default ascii_upload_enable NO | ||
65 | set_default ascii_download_enable NO | ||
66 | set_default ftpd_banner "Welcome to the ${DISTRO_NAME} FTP service!" | ||
67 | set_default chroot_local_user NO | ||
68 | set_default chroot_list_enable NO | ||
69 | set_default ls_recurse_enable YES | ||
70 | set_default secure_chroot_dir "${SECURE_CHROOT_DIR}" | ||
71 | set_default rsa_cert_file "${RSA_CERT_FILE}" | ||
72 | |||
73 | sed -e 's,@SBINDIR@,${sbindir},' ${WORKDIR}/vsftpd.xinetd.in > vsftpd.xinetd | ||
74 | } | ||
75 | do_compile() { | ||
76 | oe_runmake 'CFLAGS=${CFLAGS}' 'LIBS=${LIBS}' 'LINK=${LINK}' | ||
77 | } | ||
78 | do_install() { | ||
79 | install -d ${D}${sysconfdir} | ||
80 | install -m 644 vsftpd.conf ${D}${sysconfdir} | ||
81 | install -d ${D}${sbindir} | ||
82 | install -m 755 vsftpd ${D}${sbindir}/vsftpd | ||
83 | install -d ${D}${mandir}/man8 | ||
84 | install -m 644 vsftpd.8 ${D}${mandir}/man8/vsftpd.8 | ||
85 | install -d ${D}${mandir}/man5 | ||
86 | install -m 644 vsftpd.conf.5 ${D}${mandir}/man5/vsftpd.conf.5 | ||
87 | install -d ${D}${sysconfdir}/xinetd.d | ||
88 | install -m 644 vsftpd.xinetd ${D}${sysconfdir}/xinetd.d/vsftpd | ||
89 | install -d ${D}${SECURE_CHROOT_DIR} | ||
90 | } | ||
91 | |||
92 | RDEPENDS_${PN} = "xinetd" | ||
93 | |||
94 | USERADD_PACKAGES = "${PN}" | ||
95 | USERADD_PARAM_${PN} = "--home-dir ${SECURE_CHROOT_DIR} --no-create-home --system --shell /bin/false --user-group vsftpd" | ||