1 |
commit: d63ef8dcc42e605b3807d8c99a58fac0b4cd8331 |
2 |
Author: Tobias Klausmann <klausman <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Mar 7 17:57:51 2020 +0000 |
4 |
Commit: Tobias Klausmann <klausman <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Mar 7 17:58:58 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d63ef8dc |
7 |
|
8 |
net-ftp/atftp: remove vulnerable 0.7-r6 and associated files |
9 |
|
10 |
Package-Manager: Portage-2.3.92, Repoman-2.3.20 |
11 |
Signed-off-by: Tobias Klausmann <klausman <AT> gentoo.org> |
12 |
|
13 |
net-ftp/atftp/Manifest | 2 - |
14 |
net-ftp/atftp/atftp-0.7-r6.ebuild | 78 ------------ |
15 |
net-ftp/atftp/files/atftp-0.7-CFLAGS.patch | 32 ----- |
16 |
net-ftp/atftp/files/atftp-0.7-blockno.patch | 136 --------------------- |
17 |
net-ftp/atftp/files/atftp-0.7-glibc24.patch | 22 ---- |
18 |
net-ftp/atftp/files/atftp-0.7-illreply.patch | 12 -- |
19 |
net-ftp/atftp/files/atftp-0.7-password.patch | 94 -------------- |
20 |
net-ftp/atftp/files/atftp-0.7-pcre.patch | 14 --- |
21 |
.../atftp/files/atftp-0.7-spaced_filename.patch | 96 --------------- |
22 |
net-ftp/atftp/files/atftp-0.7-tests.patch | 23 ---- |
23 |
10 files changed, 509 deletions(-) |
24 |
|
25 |
diff --git a/net-ftp/atftp/Manifest b/net-ftp/atftp/Manifest |
26 |
index 37c22b68977..eccbf7737c8 100644 |
27 |
--- a/net-ftp/atftp/Manifest |
28 |
+++ b/net-ftp/atftp/Manifest |
29 |
@@ -1,3 +1 @@ |
30 |
DIST atftp-0.7.2.tar.gz 248038 BLAKE2B 3ca44624bf989009c2ebd0ae97927b0784e3c617a79a1bd00212a72a185302cf84f51c8bcda2012981d67cfed4d241b70f8719e78155207608f07a2227e6c437 SHA512 d602bb69451175a36e619abcff412ab1f6d0e7baf8c3f9a2b32081530fbc5816157404b80d42a8b6caa89cc83675b5cbeefcd57a5d98b8f5b43c6254b20ef28b |
31 |
-DIST atftp-0.7.dfsg.tar.gz 187992 BLAKE2B 8196c333ea8042879196ca9f9c656b4d60a332ed1d64a5738870e1d4fd5f108716da6769bf52759626ad3efce11946b5d6285ac9fbe46cb63e6e2d051fc7aeb3 SHA512 40d231c0bc0478fedb3eff9b4c540c62dd9bd6c40d9738e2db1813797a5d48e201720d43a48970ce250f1bb5b15460bb9b3d631c06f96c1a74775ecfb6d13f82 |
32 |
-DIST atftp_0.7-11.diff.gz 26055 BLAKE2B c9be58836b5a7e3943dd28dd4661abab5e86b1941c9a2b58786eebe702ab515cf1bc08bf44c8ab4157584a437e861e24eb0c833c1fa1bc774f7f8a2134b6cd27 SHA512 28747f8f3ef2fc3b122361f682fe26ba93acf09b190f61efb3cfcbb6bdeef78cfe1348aeaf1699003a7e02586579be670d85b65baad1b1165a4bec9a9279adb5 |
33 |
|
34 |
diff --git a/net-ftp/atftp/atftp-0.7-r6.ebuild b/net-ftp/atftp/atftp-0.7-r6.ebuild |
35 |
deleted file mode 100644 |
36 |
index 64badd5fa1e..00000000000 |
37 |
--- a/net-ftp/atftp/atftp-0.7-r6.ebuild |
38 |
+++ /dev/null |
39 |
@@ -1,78 +0,0 @@ |
40 |
-# Copyright 1999-2018 Gentoo Authors |
41 |
-# Distributed under the terms of the GNU General Public License v2 |
42 |
- |
43 |
-EAPI=6 |
44 |
-inherit autotools flag-o-matic systemd |
45 |
- |
46 |
-DEBIAN_PV="11" |
47 |
-DEBIAN_A="${PN}_${PV}-${DEBIAN_PV}.diff" |
48 |
- |
49 |
-DESCRIPTION="Advanced TFTP implementation client/server" |
50 |
-HOMEPAGE="https://sourceforge.net/projects/atftp/" |
51 |
-SRC_URI="mirror://sourceforge/${PN}/${P}.dfsg.tar.gz |
52 |
- mirror://debian/pool/main/a/${PN}/${DEBIAN_A}.gz" |
53 |
- |
54 |
-LICENSE="GPL-2" |
55 |
-SLOT="0" |
56 |
-KEYWORDS="amd64 arm ppc ppc64 ~s390 sparc x86" |
57 |
-IUSE="selinux tcpd readline pcre" |
58 |
- |
59 |
-DEPEND="tcpd? ( sys-apps/tcp-wrappers ) |
60 |
- readline? ( sys-libs/readline:0= ) |
61 |
- pcre? ( dev-libs/libpcre )" |
62 |
-RDEPEND="${DEPEND} |
63 |
- !net-ftp/netkit-tftp |
64 |
- !net-ftp/tftp-hpa |
65 |
- !net-ftp/uftpd |
66 |
- selinux? ( sec-policy/selinux-tftp )" |
67 |
- |
68 |
-PATCHES=( |
69 |
- "${WORKDIR}/${DEBIAN_A}" |
70 |
- "${FILESDIR}/${P}-pcre.patch" |
71 |
- "${FILESDIR}/${P}-password.patch" |
72 |
- "${FILESDIR}/${P}-tests.patch" |
73 |
- "${FILESDIR}/${P}-glibc24.patch" |
74 |
- "${FILESDIR}/${P}-blockno.patch" |
75 |
- "${FILESDIR}/${P}-spaced_filename.patch" |
76 |
- "${FILESDIR}/${P}-illreply.patch" |
77 |
- "${FILESDIR}/${P}-CFLAGS.patch" |
78 |
-) |
79 |
- |
80 |
-src_unpack() { |
81 |
- default |
82 |
- mv atftp-0.7.dfsg atftp-0.7 || die |
83 |
-} |
84 |
- |
85 |
-src_prepare() { |
86 |
- append-cppflags -D_REENTRANT -DRATE_CONTROL |
87 |
- # fix #561720 by restoring pre-GCC5 inline semantics |
88 |
- append-cflags -std=gnu89 |
89 |
- |
90 |
- default |
91 |
- eautoreconf |
92 |
-} |
93 |
- |
94 |
-src_configure() { |
95 |
- econf \ |
96 |
- $(use_enable tcpd libwrap) \ |
97 |
- $(use_enable readline libreadline) \ |
98 |
- $(use_enable pcre libpcre) \ |
99 |
- --enable-mtftp |
100 |
-} |
101 |
- |
102 |
-src_install() { |
103 |
- default |
104 |
- |
105 |
- newinitd "${FILESDIR}"/atftp.init atftp |
106 |
- newconfd "${FILESDIR}"/atftp.confd atftp |
107 |
- |
108 |
- systemd_dounit "${FILESDIR}"/atftp.service |
109 |
- systemd_install_serviced "${FILESDIR}"/atftp.service.conf |
110 |
- |
111 |
- dodoc README* BUGS FAQ Changelog INSTALL TODO |
112 |
- dodoc "${S}"/docs/* |
113 |
- |
114 |
- docinto test |
115 |
- cd "${S}"/test || die |
116 |
- dodoc load.sh mtftp.conf pcre_pattern.txt test.sh test_suite.txt |
117 |
-} |
118 |
|
119 |
diff --git a/net-ftp/atftp/files/atftp-0.7-CFLAGS.patch b/net-ftp/atftp/files/atftp-0.7-CFLAGS.patch |
120 |
deleted file mode 100644 |
121 |
index 566c1791c59..00000000000 |
122 |
--- a/net-ftp/atftp/files/atftp-0.7-CFLAGS.patch |
123 |
+++ /dev/null |
124 |
@@ -1,32 +0,0 @@ |
125 |
---- atftp-0.7/configure.ac |
126 |
-+++ atftp-0.7/configure.ac |
127 |
-@@ -66,29 +66,6 @@ |
128 |
- dnl Check for AIX |
129 |
- AC_AIX |
130 |
- |
131 |
--CFLAGS="-g -Wall -D_REENTRANT" |
132 |
-- |
133 |
--if test x$debug = xtrue; then |
134 |
-- CFLAGS="$CFLAGS -O0 -DDEBUG" |
135 |
--else |
136 |
-- if test -n "$auto_cflags"; then |
137 |
-- if test -n "$GCC"; then |
138 |
-- CFLAGS="$CFLAGS -g -O2 -Wall -Wno-implicit" |
139 |
-- else |
140 |
-- case "$host_os" in |
141 |
-- *hpux*) CFLAGS="$CFLAGS +O3" |
142 |
-- ;; |
143 |
-- *ultrix* | *osf*) CFLAGS="$CFLAGS -O -Olimit 2000" |
144 |
-- ;; |
145 |
-- *) CFLAGS="$CFLAGS -O2" |
146 |
-- ;; |
147 |
-- esac |
148 |
-- fi |
149 |
-- else |
150 |
-- CFLAGS="$CFLAGS -O2" |
151 |
-- fi |
152 |
--fi |
153 |
-- |
154 |
- AC_PROG_MAKE_SET |
155 |
- AC_PROG_INSTALL |
156 |
- |
157 |
|
158 |
diff --git a/net-ftp/atftp/files/atftp-0.7-blockno.patch b/net-ftp/atftp/files/atftp-0.7-blockno.patch |
159 |
deleted file mode 100644 |
160 |
index 6a3184f98be..00000000000 |
161 |
--- a/net-ftp/atftp/files/atftp-0.7-blockno.patch |
162 |
+++ /dev/null |
163 |
@@ -1,136 +0,0 @@ |
164 |
---- atftp-0.7/tftp_file.c~ 2010-05-27 13:05:12.000000000 -0500 |
165 |
-+++ atftp-0.7/tftp_file.c 2010-05-27 12:50:05.000000000 -0500 |
166 |
-@@ -133,19 +133,21 @@ |
167 |
- int mcast_sockfd = 0; |
168 |
- struct sockaddr_in sa_mcast; |
169 |
- struct ip_mreq mreq; |
170 |
- struct hostent *host; |
171 |
- int master_client = 0; |
172 |
- unsigned int file_bitmap[NB_BLOCK]; |
173 |
- int prev_bitmap_hole = -1; /* the previous hole found in the bitmap */ |
174 |
- char string[MAXLEN]; |
175 |
-+ int rx_block_number; |
176 |
- |
177 |
- int prev_block_number = 0; /* needed to support netascii convertion */ |
178 |
- int temp = 0; |
179 |
-+ size_t ignore; |
180 |
- |
181 |
- data->file_size = 0; |
182 |
- tftp_cancel = 0; |
183 |
- from.sin_addr.s_addr = 0; |
184 |
- |
185 |
- memset(&sa_mcast, 0, sizeof(struct sockaddr_in)); |
186 |
- memset(&file_bitmap, 0, sizeof(file_bitmap)); |
187 |
- |
188 |
-@@ -300,17 +302,17 @@ |
189 |
- { |
190 |
- connect(sockfd, (struct sockaddr *)&sa, sizeof(sa)); |
191 |
- connected = 1; |
192 |
- } |
193 |
- state = S_OACK_RECEIVED; |
194 |
- break; |
195 |
- case GET_ERROR: |
196 |
- fprintf(stderr, "tftp: error received from server <"); |
197 |
-- fwrite(tftphdr->th_msg, 1, data_size - 4 - 1, stderr); |
198 |
-+ ignore = fwrite(tftphdr->th_msg, 1, data_size - 4 - 1, stderr); |
199 |
- fprintf(stderr, ">\n"); |
200 |
- state = S_ABORT; |
201 |
- break; |
202 |
- case GET_DATA: |
203 |
- number_of_timeout = 0; |
204 |
- /* if the socket if not connected, connect it */ |
205 |
- if (!connected) |
206 |
- { |
207 |
-@@ -513,21 +515,24 @@ |
208 |
- state = S_WAIT_PACKET; |
209 |
- break; |
210 |
- case S_DATA_RECEIVED: |
211 |
- if ((multicast && master_client) || (!multicast)) |
212 |
- timeout_state = S_SEND_ACK; |
213 |
- else |
214 |
- timeout_state = S_WAIT_PACKET; |
215 |
- |
216 |
-- block_number = ntohs(tftphdr->th_block); |
217 |
-+ rx_block_number = ntohs(tftphdr->th_block); |
218 |
- if (data->trace) |
219 |
- fprintf(stderr, "received DATA <block: %d, size: %d>\n", |
220 |
- ntohs(tftphdr->th_block), data_size - 4); |
221 |
- |
222 |
-+ if ((uint16_t)rx_block_number == (uint16_t)(block_number+1)) |
223 |
-+ ++block_number; |
224 |
-+ |
225 |
- if (tftp_file_write(fp, tftphdr->th_data, data->data_buffer_size - 4, block_number, |
226 |
- data_size - 4, convert, &prev_block_number, &temp) |
227 |
- != data_size - 4) |
228 |
- { |
229 |
- |
230 |
- fprintf(stderr, "tftp: error writing to file %s\n", |
231 |
- data->local_file); |
232 |
- tftp_send_error(sockfd, &sa, ENOSPACE, data->data_buffer, |
233 |
-@@ -613,19 +618,21 @@ |
234 |
- int connected; /* 1 when sockfd is connected */ |
235 |
- struct tftphdr *tftphdr = (struct tftphdr *)data->data_buffer; |
236 |
- FILE *fp; /* the local file pointer */ |
237 |
- int number_of_timeout = 0; |
238 |
- struct stat file_stat; |
239 |
- int convert = 0; /* if true, do netascii convertion */ |
240 |
- char string[MAXLEN]; |
241 |
- |
242 |
-+ int ack_block_number; |
243 |
- int prev_block_number = 0; /* needed to support netascii convertion */ |
244 |
- int prev_file_pos = 0; |
245 |
- int temp = 0; |
246 |
-+ size_t ignore; |
247 |
- |
248 |
- data->file_size = 0; |
249 |
- tftp_cancel = 0; |
250 |
- from.sin_addr.s_addr = 0; |
251 |
- |
252 |
- /* make sure the socket is not connected */ |
253 |
- sa.sin_family = AF_UNSPEC; |
254 |
- connect(sockfd, (struct sockaddr *)&sa, sizeof(sa)); |
255 |
-@@ -759,20 +766,23 @@ |
256 |
- case GET_ACK: |
257 |
- number_of_timeout = 0; |
258 |
- /* if the socket if not connected, connect it */ |
259 |
- if (!connected) |
260 |
- { |
261 |
- //connect(sockfd, (struct sockaddr *)&sa, sizeof(sa)); |
262 |
- connected = 1; |
263 |
- } |
264 |
-- block_number = ntohs(tftphdr->th_block); |
265 |
-+ ack_block_number = ntohs(tftphdr->th_block); |
266 |
-+ if ((uint16_t)(block_number+1) == ack_block_number) |
267 |
-+ ++block_number; |
268 |
- if (data->trace) |
269 |
- fprintf(stderr, "received ACK <block: %d>\n", |
270 |
-- block_number); |
271 |
-+ ack_block_number); |
272 |
-+ |
273 |
- if ((last_block != -1) && (block_number > last_block)) |
274 |
- { |
275 |
- state = S_END; |
276 |
- break; |
277 |
- } |
278 |
- state = S_SEND_DATA; |
279 |
- break; |
280 |
- case GET_OACK: |
281 |
-@@ -782,17 +792,17 @@ |
282 |
- { |
283 |
- //connect(sockfd, (struct sockaddr *)&sa, sizeof(sa)); |
284 |
- connected = 1; |
285 |
- } |
286 |
- state = S_OACK_RECEIVED; |
287 |
- break; |
288 |
- case GET_ERROR: |
289 |
- fprintf(stderr, "tftp: error received from server <"); |
290 |
-- fwrite(tftphdr->th_msg, 1, data_size - 4 - 1, stderr); |
291 |
-+ ignore = fwrite(tftphdr->th_msg, 1, data_size - 4 - 1, stderr); |
292 |
- fprintf(stderr, ">\n"); |
293 |
- state = S_ABORT; |
294 |
- break; |
295 |
- case GET_DISCARD: |
296 |
- /* consider discarded packet as timeout to make sure when don't lock up |
297 |
- if routing is broken */ |
298 |
- number_of_timeout++; |
299 |
- fprintf(stderr, "tftp: packet discard <%s:%d>.\n", |
300 |
|
301 |
diff --git a/net-ftp/atftp/files/atftp-0.7-glibc24.patch b/net-ftp/atftp/files/atftp-0.7-glibc24.patch |
302 |
deleted file mode 100644 |
303 |
index 195aec69b02..00000000000 |
304 |
--- a/net-ftp/atftp/files/atftp-0.7-glibc24.patch |
305 |
+++ /dev/null |
306 |
@@ -1,22 +0,0 @@ |
307 |
---- atftp-0.7/stats.c.org |
308 |
-+++ atftp-0.7/stats.c |
309 |
-@@ -18,6 +18,7 @@ |
310 |
- |
311 |
- #include <limits.h> |
312 |
- #include <string.h> |
313 |
-+#include <unistd.h> |
314 |
- #include "tftp_def.h" |
315 |
- #include "stats.h" |
316 |
- #include "logger.h" |
317 |
-@@ -157,8 +158,9 @@ |
318 |
- |
319 |
- logger(LOG_INFO, " Load measurements:"); |
320 |
-+ long sc_clk_tck = sysconf(_SC_CLK_TCK); |
321 |
- logger(LOG_INFO, " User: %8.3fs Sys:%8.3fs", |
322 |
-- (double)(s_stats.tms.tms_utime) / CLK_TCK, |
323 |
-- (double)(s_stats.tms.tms_stime) / CLK_TCK); |
324 |
-+ (double)(s_stats.tms.tms_utime) / sc_clk_tck, |
325 |
-+ (double)(s_stats.tms.tms_stime) / sc_clk_tck); |
326 |
- logger(LOG_INFO, " Total:%8.3fs CPU:%8.3f%%", |
327 |
- (double)(tmp.tv_sec + tmp.tv_usec * 1e-6), |
328 |
- (double)(s_stats.tms.tms_utime + s_stats.tms.tms_stime) / |
329 |
|
330 |
diff --git a/net-ftp/atftp/files/atftp-0.7-illreply.patch b/net-ftp/atftp/files/atftp-0.7-illreply.patch |
331 |
deleted file mode 100644 |
332 |
index 0f1cacd9b95..00000000000 |
333 |
--- a/net-ftp/atftp/files/atftp-0.7-illreply.patch |
334 |
+++ /dev/null |
335 |
@@ -1,12 +0,0 @@ |
336 |
-*** atftp-0.7/tftp_def.old.c 2009-02-28 17:56:12.000000000 +0100 |
337 |
---- atftp-0.7/tftp_def.c 2009-02-28 17:57:02.000000000 +0100 |
338 |
-*************** |
339 |
-*** 141,146 **** |
340 |
---- 141,147 ---- |
341 |
- */ |
342 |
- inline char *Strncpy(char *to, const char *from, size_t size) |
343 |
- { |
344 |
-+ if (size <= 0) { *to = '\000'; return to; } |
345 |
- to[size-1] = '\000'; |
346 |
- return strncpy(to, from, size - 1); |
347 |
- } |
348 |
|
349 |
diff --git a/net-ftp/atftp/files/atftp-0.7-password.patch b/net-ftp/atftp/files/atftp-0.7-password.patch |
350 |
deleted file mode 100644 |
351 |
index 26b59085dde..00000000000 |
352 |
--- a/net-ftp/atftp/files/atftp-0.7-password.patch |
353 |
+++ /dev/null |
354 |
@@ -1,94 +0,0 @@ |
355 |
-diff -Naur atftp-0.7.orig/tftp.c atftp-0.7/tftp.c |
356 |
---- atftp-0.7.orig/tftp.c 2004-03-15 18:55:56.000000000 -0500 |
357 |
-+++ atftp-0.7/tftp.c 2005-08-29 21:40:06.000000000 -0400 |
358 |
-@@ -525,6 +525,10 @@ |
359 |
- fprintf(stderr, " multicast: enabled\n"); |
360 |
- else |
361 |
- fprintf(stderr, " multicast: disabled\n"); |
362 |
-+ if (data.tftp_options[OPT_PASSWORD].specified) |
363 |
-+ fprintf(stderr, " password: enabled\n"); |
364 |
-+ else |
365 |
-+ fprintf(stderr, " password: disabled\n"); |
366 |
- return ERR; |
367 |
- } |
368 |
- /* if disabling an option */ |
369 |
-@@ -971,6 +975,7 @@ |
370 |
- { "put", 0, NULL, 'p'}, |
371 |
- { "local-file", 1, NULL, 'l'}, |
372 |
- { "remote-file", 1, NULL, 'r'}, |
373 |
-+ { "password", 1, NULL, 'P'}, |
374 |
- { "tftp-timeout", 1, NULL, 'T'}, |
375 |
- { "mode", 1, NULL, 'M'}, |
376 |
- { "option", 1, NULL, 'O'}, |
377 |
-@@ -993,7 +998,7 @@ |
378 |
- }; |
379 |
- |
380 |
- /* Support old argument until 0.8 */ |
381 |
-- while ((c = getopt_long(argc, argv, /*"gpl:r:Vh"*/ "gpl:r:Vht:b:sm", |
382 |
-+ while ((c = getopt_long(argc, argv, /*"gpl:r:Vh"*/ "gpl:r:Vht:b:smP:", |
383 |
- options, &option_index)) != EOF) |
384 |
- { |
385 |
- switch (c) |
386 |
-@@ -1028,6 +1033,11 @@ |
387 |
- else |
388 |
- action = PUT; |
389 |
- break; |
390 |
-+ case 'P': |
391 |
-+ snprintf(string, sizeof(string), "option password %s", optarg); |
392 |
-+ make_arg(string, &ac, &av); |
393 |
-+ process_cmd(ac, av); |
394 |
-+ break; |
395 |
- case 'l': |
396 |
- interactive = 0; |
397 |
- Strncpy(local_file, optarg, MAXLEN); |
398 |
-@@ -1169,6 +1179,7 @@ |
399 |
- " -p, --put : put file\n" |
400 |
- " -l, --local-file <file> : local file name\n" |
401 |
- " -r, --remote-file <file> : remote file name\n" |
402 |
-+ " -P, --password <password>: specify password (Linksys ext.)\n" |
403 |
- " --tftp-timeout <value> : delay before retransmission, client side\n" |
404 |
- #if 0 |
405 |
- " t, --timeout <value> : delay before retransmission, " |
406 |
-diff -Naur atftp-0.7.orig/tftp_def.c atftp-0.7/tftp_def.c |
407 |
---- atftp-0.7.orig/tftp_def.c 2004-02-12 22:16:09.000000000 -0500 |
408 |
-+++ atftp-0.7/tftp_def.c 2005-08-29 21:36:57.000000000 -0400 |
409 |
-@@ -37,6 +37,7 @@ |
410 |
- { "timeout", "5", 0, 1 }, /* 2348, 2349, 2090. */ |
411 |
- { "blksize", "512", 0, 1 }, /* This is the default option */ |
412 |
- { "multicast", "", 0, 1 }, /* structure */ |
413 |
-+ { "password", "", 0, 1}, /* password */ |
414 |
- { "", "", 0, 0} |
415 |
- }; |
416 |
- |
417 |
-diff -Naur atftp-0.7.orig/tftp_def.h atftp-0.7/tftp_def.h |
418 |
---- atftp-0.7.orig/tftp_def.h 2004-02-12 22:16:09.000000000 -0500 |
419 |
-+++ atftp-0.7/tftp_def.h 2005-08-29 20:16:27.000000000 -0400 |
420 |
-@@ -40,6 +40,7 @@ |
421 |
- #define OPT_TIMEOUT 3 |
422 |
- #define OPT_BLKSIZE 4 |
423 |
- #define OPT_MULTICAST 5 |
424 |
-+#define OPT_PASSWORD 6 |
425 |
- #define OPT_NUMBER 7 |
426 |
- |
427 |
- #define OPT_SIZE 12 |
428 |
-diff -Naur atftp-0.7.orig/tftp_io.c atftp-0.7/tftp_io.c |
429 |
---- atftp-0.7.orig/tftp_io.c 2004-02-18 20:30:00.000000000 -0500 |
430 |
-+++ atftp-0.7/tftp_io.c 2005-08-29 22:05:11.000000000 -0400 |
431 |
-@@ -70,10 +70,13 @@ |
432 |
- break; |
433 |
- if (tftp_options[i].enabled && tftp_options[i].specified) |
434 |
- { |
435 |
-- Strncpy(data_buffer + buf_index, tftp_options[i].option, |
436 |
-- data_buffer_size - buf_index); |
437 |
-- buf_index += strlen(tftp_options[i].option); |
438 |
-- buf_index++; |
439 |
-+ if (i != OPT_PASSWORD) |
440 |
-+ { |
441 |
-+ Strncpy(data_buffer + buf_index, tftp_options[i].option, |
442 |
-+ data_buffer_size - buf_index); |
443 |
-+ buf_index += strlen(tftp_options[i].option); |
444 |
-+ buf_index++; |
445 |
-+ } |
446 |
- Strncpy(data_buffer + buf_index, tftp_options[i].value, |
447 |
- data_buffer_size - buf_index); |
448 |
- buf_index += strlen(tftp_options[i].value); |
449 |
|
450 |
diff --git a/net-ftp/atftp/files/atftp-0.7-pcre.patch b/net-ftp/atftp/files/atftp-0.7-pcre.patch |
451 |
deleted file mode 100644 |
452 |
index 1f24b67471e..00000000000 |
453 |
--- a/net-ftp/atftp/files/atftp-0.7-pcre.patch |
454 |
+++ /dev/null |
455 |
@@ -1,14 +0,0 @@ |
456 |
---- atftp-0.7/tftpd_pcre.c~ 2005-10-17 23:14:52.000000000 +0200 |
457 |
-+++ atftp-0.7/tftpd_pcre.c 2005-10-17 23:14:52.000000000 +0200 |
458 |
-@@ -211,9 +211,9 @@ |
459 |
- chp++; /* point to value indicating substring */ |
460 |
- rc = pcre_get_substring(str, ovector, matches, *chp - 0x30, &tmpstr); |
461 |
- /* found string */ |
462 |
-- if (rc > 0) |
463 |
-+ if (rc > 0 && outchp - outstr + rc+1 < outsize) |
464 |
- { |
465 |
-- Strncpy(outchp, tmpstr, rc); |
466 |
-+ Strncpy(outchp, tmpstr, rc+1); |
467 |
- outchp += rc; |
468 |
- pcre_free_substring(tmpstr); |
469 |
- continue; |
470 |
|
471 |
diff --git a/net-ftp/atftp/files/atftp-0.7-spaced_filename.patch b/net-ftp/atftp/files/atftp-0.7-spaced_filename.patch |
472 |
deleted file mode 100644 |
473 |
index da96d9f6b82..00000000000 |
474 |
--- a/net-ftp/atftp/files/atftp-0.7-spaced_filename.patch |
475 |
+++ /dev/null |
476 |
@@ -1,96 +0,0 @@ |
477 |
---- atftp-0.7/tftp.c~ 2010-06-03 08:51:14.000000000 -0500 |
478 |
-+++ atftp-0.7/tftp.c 2010-06-03 09:40:56.000000000 -0500 |
479 |
-@@ -18,16 +18,17 @@ |
480 |
- #include "config.h" |
481 |
- |
482 |
- #include <stdio.h> |
483 |
- #include <stdlib.h> |
484 |
- #include <string.h> |
485 |
- #include <unistd.h> |
486 |
- #include <getopt.h> |
487 |
- #include <string.h> |
488 |
-+#include <stdarg.h> |
489 |
- |
490 |
- #include <sys/types.h> |
491 |
- #include <sys/socket.h> |
492 |
- #include <netinet/in.h> |
493 |
- #include <arpa/inet.h> |
494 |
- #include <netdb.h> |
495 |
- |
496 |
- #include <signal.h> |
497 |
-@@ -344,16 +345,41 @@ |
498 |
- |
499 |
- /* If no names matched, then return NULL. */ |
500 |
- return NULL; |
501 |
- } |
502 |
- # endif |
503 |
- #endif |
504 |
- |
505 |
- /* |
506 |
-+ * set argc/argv from variadic string arguments |
507 |
-+*/ |
508 |
-+void make_arg_vector(int *argc, char***argv, ...) |
509 |
-+{ |
510 |
-+ char **p; |
511 |
-+ char *s; |
512 |
-+ va_list argp; |
513 |
-+ |
514 |
-+ // how many args? |
515 |
-+ *argc = 0; |
516 |
-+ va_start(argp, argv); |
517 |
-+ while ( (s=va_arg(argp, char*)) ) |
518 |
-+ ++*argc; |
519 |
-+ |
520 |
-+ // allocate storage |
521 |
-+ *argv = malloc(*argc * sizeof (char*)); |
522 |
-+ |
523 |
-+ // store args |
524 |
-+ p = *argv; |
525 |
-+ va_start(argp, argv); |
526 |
-+ while ( (s=va_arg(argp, char*)) ) |
527 |
-+ *p++ = s; |
528 |
-+} |
529 |
-+ |
530 |
-+/* |
531 |
- * Split a string into args. |
532 |
- */ |
533 |
- void make_arg(char *string, int *argc, char ***argv) |
534 |
- { |
535 |
- static char *tmp = NULL; |
536 |
- size_t argz_len; |
537 |
- |
538 |
- /* split the string to an argz vector */ |
539 |
-@@ -1142,30 +1168,26 @@ |
540 |
- argv[optind+1]); |
541 |
- make_arg(string, &ac, &av); |
542 |
- process_cmd(ac, av); |
543 |
- } |
544 |
- |
545 |
- if (!interactive) |
546 |
- { |
547 |
- if (action == PUT) |
548 |
-- snprintf(string, sizeof(string), "put %s %s", local_file, |
549 |
-- remote_file); |
550 |
-+ make_arg_vector(&ac,&av,"put",local_file,remote_file,NULL); |
551 |
- else if (action == GET) |
552 |
-- snprintf(string, sizeof(string), "get %s %s", remote_file, |
553 |
-- local_file); |
554 |
-+ make_arg_vector(&ac,&av,"get",remote_file,local_file,NULL); |
555 |
- else if (action == MGET) |
556 |
-- snprintf(string, sizeof(string), "mget %s %s", remote_file, |
557 |
-- local_file); |
558 |
-+ make_arg_vector(&ac,&av,"mget",remote_file,local_file,NULL); |
559 |
- else |
560 |
- { |
561 |
- fprintf(stderr, "No action specified in batch mode!\n"); |
562 |
- exit(ERR); |
563 |
- } |
564 |
-- make_arg(string, &ac, &av); |
565 |
- if (process_cmd(ac, av) == ERR) |
566 |
- exit(ERR); |
567 |
- } |
568 |
- return OK; |
569 |
- } |
570 |
- |
571 |
- void tftp_usage(void) |
572 |
- { |
573 |
|
574 |
diff --git a/net-ftp/atftp/files/atftp-0.7-tests.patch b/net-ftp/atftp/files/atftp-0.7-tests.patch |
575 |
deleted file mode 100644 |
576 |
index 9e087950e65..00000000000 |
577 |
--- a/net-ftp/atftp/files/atftp-0.7-tests.patch |
578 |
+++ /dev/null |
579 |
@@ -1,23 +0,0 @@ |
580 |
-diff -Naur atftp-0.7.orig/test/test.sh atftp-0.7/test/test.sh |
581 |
---- atftp-0.7.orig/test/test.sh 2003-04-28 21:59:51.000000000 -0400 |
582 |
-+++ atftp-0.7/test/test.sh 2005-10-26 22:42:15.000000000 -0400 |
583 |
-@@ -151,7 +151,7 @@ |
584 |
- test_blocksize 1428 |
585 |
- test_blocksize 16000 |
586 |
- test_blocksize 64000 |
587 |
--test_blocksize 65465 |
588 |
-+test_blocksize 65464 |
589 |
- |
590 |
- # |
591 |
- # testing fot tsize |
592 |
-@@ -162,9 +162,9 @@ |
593 |
- TSIZE=`grep "OACK <tsize:" out | sed -e "s/[^0-9]//g"` |
594 |
- if [ "$TSIZE" != "2048" ]; then |
595 |
- echo "ERROR (server report $TSIZE bytes but it should be 2048)" |
596 |
-+ ERROR=1 |
597 |
- else |
598 |
- echo "OK" |
599 |
-- ERROR=1 |
600 |
- fi |
601 |
- |
602 |
- # |