blob: 57adb52c143786e50871f006e5835dea8a81eaed [file] [log] [blame]
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +00001/* vi: set sw=4 ts=4: */
2/*
Eric Andersenc7bda1c2004-03-15 08:29:22 +00003 * ftpget
4 *
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +00005 * Mini implementation of FTP to retrieve a remote file.
6 *
7 * Copyright (C) 2002 Jeff Angielski, The PTR Group <jeff@theptrgroup.com>
Denis Vlasenko0beaff82007-09-21 13:16:32 +00008 * Copyright (C) 2002 Glenn McGrath
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +00009 *
10 * Based on wget.c by Chip Rosenthal Covad Communications
11 * <chip@laserlink.net>
12 *
Rob Landley6f037222005-11-08 00:52:31 +000013 * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +000014 */
15
Denis Vlasenkob6adbf12007-05-26 19:00:18 +000016#include "libbb.h"
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +000017
Denis Vlasenko0e7940a2008-03-29 07:37:42 +000018struct globals {
Denis Vlasenkob6aae0f2007-01-29 22:51:25 +000019 const char *user;
20 const char *password;
Denis Vlasenko8e9ccba2007-01-11 16:50:23 +000021 struct len_and_sockaddr *lsa;
Denis Vlasenko0e7940a2008-03-29 07:37:42 +000022 int verbose_flag;
23 int do_continue;
24 char buf[1]; /* actually [BUF_SIZE] */
25};
26#define G (*(struct globals*)&bb_common_bufsiz1)
27enum { BUFSZ = COMMON_BUFSIZE - offsetof(struct globals, buf) };
28struct BUG_G_too_big {
29 char BUG_G_too_big[sizeof(G) <= COMMON_BUFSIZE ? 1 : -1];
30};
31#define user (G.user )
32#define password (G.password )
33#define lsa (G.lsa )
34#define verbose_flag (G.verbose_flag)
35#define do_continue (G.do_continue )
36#define buf (G.buf )
37#define INIT_G() do { \
38} while (0)
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +000039
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +000040
Denis Vlasenko0e7940a2008-03-29 07:37:42 +000041static void ftp_die(const char *msg) ATTRIBUTE_NORETURN;
42static void ftp_die(const char *msg)
Denis Vlasenko562dc242007-01-03 21:55:50 +000043{
Denis Vlasenko0e7940a2008-03-29 07:37:42 +000044 const char *cp = buf; /* buf holds peer's response */
45
Denis Vlasenko562dc242007-01-03 21:55:50 +000046 /* Guard against garbage from remote server */
Denis Vlasenko0e7940a2008-03-29 07:37:42 +000047 while (*cp >= ' ' && *cp < '\x7f')
48 cp++;
Denis Vlasenko562dc242007-01-03 21:55:50 +000049 bb_error_msg_and_die("unexpected server response%s%s: %.*s",
50 msg ? " to " : "", msg ? msg : "",
Denis Vlasenko0e7940a2008-03-29 07:37:42 +000051 (int)(cp - buf), buf);
Denis Vlasenko562dc242007-01-03 21:55:50 +000052}
53
Denis Vlasenko0e7940a2008-03-29 07:37:42 +000054static int ftpcmd(const char *s1, const char *s2, FILE *stream)
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +000055{
Denis Vlasenko562dc242007-01-03 21:55:50 +000056 unsigned n;
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +000057 if (verbose_flag) {
Denis Vlasenko3821fb12007-01-11 16:51:21 +000058 bb_error_msg("cmd %s %s", s1, s2);
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +000059 }
60
61 if (s1) {
Denis Vlasenko0e7940a2008-03-29 07:37:42 +000062 fprintf(stream, (s2 ? "%s %s\r\n" : "%s %s\r\n"+3), s1, s2);
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +000063 }
Denis Vlasenko0e7940a2008-03-29 07:37:42 +000064
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +000065 do {
Glenn L McGrath5ec58282004-05-04 10:43:34 +000066 char *buf_ptr;
67
Denis Vlasenko0e7940a2008-03-29 07:37:42 +000068 if (fgets(buf, BUFSZ - 2, stream) == NULL) {
Denis Vlasenko13858992006-10-08 12:49:22 +000069 bb_perror_msg_and_die("fgets");
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +000070 }
Glenn L McGrath5ec58282004-05-04 10:43:34 +000071 buf_ptr = strstr(buf, "\r\n");
72 if (buf_ptr) {
73 *buf_ptr = '\0';
74 }
Denis Vlasenko13858992006-10-08 12:49:22 +000075 } while (!isdigit(buf[0]) || buf[3] != ' ');
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +000076
Denis Vlasenko562dc242007-01-03 21:55:50 +000077 buf[3] = '\0';
78 n = xatou(buf);
79 buf[3] = ' ';
80 return n;
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +000081}
82
Denis Vlasenko0e7940a2008-03-29 07:37:42 +000083static FILE *ftp_login(void)
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +000084{
85 FILE *control_stream;
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +000086
87 /* Connect to the command socket */
Denis Vlasenko0e7940a2008-03-29 07:37:42 +000088 control_stream = fdopen(xconnect_stream(lsa), "r+");
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +000089 if (control_stream == NULL) {
Denis Vlasenko8e9ccba2007-01-11 16:50:23 +000090 /* fdopen failed - extremely unlikely */
Denis Vlasenko562dc242007-01-03 21:55:50 +000091 bb_perror_nomsg_and_die();
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +000092 }
93
Denis Vlasenko0e7940a2008-03-29 07:37:42 +000094 if (ftpcmd(NULL, NULL, control_stream) != 220) {
95 ftp_die(NULL);
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +000096 }
97
98 /* Login to the server */
Denis Vlasenko0e7940a2008-03-29 07:37:42 +000099 switch (ftpcmd("USER", user, control_stream)) {
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000100 case 230:
101 break;
102 case 331:
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000103 if (ftpcmd("PASS", password, control_stream) != 230) {
104 ftp_die("PASS");
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000105 }
106 break;
107 default:
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000108 ftp_die("USER");
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000109 }
110
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000111 ftpcmd("TYPE I", NULL, control_stream);
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000112
Denis Vlasenko079f8af2006-11-27 16:49:31 +0000113 return control_stream;
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000114}
115
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000116static int xconnect_ftpdata(void)
Denis Vlasenko6c615a62008-03-28 22:11:49 +0000117{
118 char *buf_ptr;
119 unsigned port_num;
120
121 /* Response is "NNN garbageN1,N2,N3,N4,P1,P2[)garbage]
122 * Server's IP is N1.N2.N3.N4 (we ignore it)
123 * Server's port for data connection is P1*256+P2 */
124 buf_ptr = strrchr(buf, ')');
125 if (buf_ptr) *buf_ptr = '\0';
126
127 buf_ptr = strrchr(buf, ',');
128 *buf_ptr = '\0';
129 port_num = xatoul_range(buf_ptr + 1, 0, 255);
130
131 buf_ptr = strrchr(buf, ',');
132 *buf_ptr = '\0';
133 port_num += xatoul_range(buf_ptr + 1, 0, 255) * 256;
134
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000135 set_nport(lsa, htons(port_num));
136 return xconnect_stream(lsa);
Denis Vlasenko6c615a62008-03-28 22:11:49 +0000137}
138
Rob Landleyb1c3fbc2006-05-04 19:52:28 +0000139#if !ENABLE_FTPGET
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000140int ftp_receive(FILE *control_stream,
Denis Vlasenko7039a662006-10-08 17:54:47 +0000141 const char *local_path, char *server_path);
Rob Landleyb1c3fbc2006-05-04 19:52:28 +0000142#else
Denis Vlasenko7039a662006-10-08 17:54:47 +0000143static
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000144int ftp_receive(FILE *control_stream,
Eric Andersen04d055f2003-11-03 21:20:18 +0000145 const char *local_path, char *server_path)
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000146{
Denis Vlasenko714701c2006-12-22 00:21:07 +0000147#define filesize ((off_t)-1)
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000148 int fd_data;
Glenn L McGrath236e93d2003-12-20 05:43:34 +0000149 int fd_local = -1;
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000150 off_t beg_range = 0;
151
Denis Vlasenko6c615a62008-03-28 22:11:49 +0000152/*
153TODO: PASV command will not work for IPv6. RFC2428 describes
154IPv6-capable "extended PASV" - EPSV.
155
156"EPSV [protocol]" asks server to bind to and listen on a data port
157in specified protocol. Protocol is 1 for IPv4, 2 for IPv6.
158If not specified, defaults to "same as used for control connection".
159If server understood you, it should answer "229 <some text>(|||port|)"
160where "|" are literal pipe chars and "port" is ASCII decimal port#.
161
162There is also an IPv6-capable replacement for PORT (EPRT),
163but we don't need that.
164
165TODO: fold in sending of PASV/EPSV and parsing of response into
166xconnect_ftpdata(). (Also, need to stop ignoring IP address in PASV
167response).
168*/
169
170 /* connect to the data socket */
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000171 if (ftpcmd("PASV", NULL, control_stream) != 227) {
172 ftp_die("PASV");
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000173 }
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000174 fd_data = xconnect_ftpdata();
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000175
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000176 if (ftpcmd("SIZE", server_path, control_stream) != 213) {
Rob Landleybc059bc2006-01-10 06:36:00 +0000177 do_continue = 0;
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000178 }
179
Denis Vlasenko9f739442006-12-16 23:49:13 +0000180 if (LONE_DASH(local_path)) {
Eric Andersen70060d22004-03-27 10:02:48 +0000181 fd_local = STDOUT_FILENO;
Glenn L McGrath236e93d2003-12-20 05:43:34 +0000182 do_continue = 0;
183 }
184
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000185 if (do_continue) {
186 struct stat sbuf;
Denis Vlasenko6c615a62008-03-28 22:11:49 +0000187 /* lstat would be wrong here! */
188 if (stat(local_path, &sbuf) < 0) {
189 bb_perror_msg_and_die("stat");
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000190 }
191 if (sbuf.st_size > 0) {
192 beg_range = sbuf.st_size;
193 } else {
194 do_continue = 0;
195 }
196 }
197
198 if (do_continue) {
Denis Vlasenkocf30cc82006-11-24 14:53:18 +0000199 sprintf(buf, "REST %"OFF_FMT"d", beg_range);
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000200 if (ftpcmd(buf, NULL, control_stream) != 350) {
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000201 do_continue = 0;
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000202 }
203 }
204
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000205 if (ftpcmd("RETR", server_path, control_stream) > 150) {
206 ftp_die("RETR");
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000207 }
208
Denis Vlasenko6c615a62008-03-28 22:11:49 +0000209 /* make local _after_ we know that remote file exists */
Glenn L McGrath236e93d2003-12-20 05:43:34 +0000210 if (fd_local == -1) {
Denis Vlasenko6c615a62008-03-28 22:11:49 +0000211 fd_local = xopen(local_path,
212 do_continue ? (O_APPEND | O_WRONLY)
213 : (O_CREAT | O_TRUNC | O_WRONLY)
214 );
Glenn L McGrath1643f412002-12-18 02:47:40 +0000215 }
216
Denis Vlasenko6c615a62008-03-28 22:11:49 +0000217// TODO: merge tail of ftp_receive and ftp_send starting from here
218
219 /* copy the file */
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000220 if (bb_copyfd_eof(fd_data, fd_local) == -1) {
221 /* error msg is already printed by bb_copyfd_eof */
222 return EXIT_FAILURE;
Glenn L McGrath25fe94f2002-12-13 08:20:44 +0000223 }
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000224
225 /* close it all down */
226 close(fd_data);
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000227 if (ftpcmd(NULL, NULL, control_stream) != 226) {
228 ftp_die(NULL);
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000229 }
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000230 ftpcmd("QUIT", NULL, control_stream);
Eric Andersenc7bda1c2004-03-15 08:29:22 +0000231
Denis Vlasenko079f8af2006-11-27 16:49:31 +0000232 return EXIT_SUCCESS;
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000233}
234#endif
235
Rob Landleyb1c3fbc2006-05-04 19:52:28 +0000236#if !ENABLE_FTPPUT
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000237int ftp_send(FILE *control_stream,
Denis Vlasenko7039a662006-10-08 17:54:47 +0000238 const char *server_path, char *local_path);
Rob Landleyb1c3fbc2006-05-04 19:52:28 +0000239#else
Denis Vlasenko7039a662006-10-08 17:54:47 +0000240static
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000241int ftp_send(FILE *control_stream,
Eric Andersen04d055f2003-11-03 21:20:18 +0000242 const char *server_path, char *local_path)
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000243{
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000244 int fd_data;
245 int fd_local;
246 int response;
247
Denis Vlasenko6c615a62008-03-28 22:11:49 +0000248 /* connect to the data socket */
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000249 if (ftpcmd("PASV", NULL, control_stream) != 227) {
250 ftp_die("PASV");
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000251 }
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000252 fd_data = xconnect_ftpdata();
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000253
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000254 /* get the local file */
Denis Vlasenko9f739442006-12-16 23:49:13 +0000255 fd_local = STDIN_FILENO;
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000256 if (NOT_LONE_DASH(local_path))
Rob Landleyd921b2e2006-08-03 15:41:12 +0000257 fd_local = xopen(local_path, O_RDONLY);
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000258
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000259 response = ftpcmd("STOR", server_path, control_stream);
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000260 switch (response) {
261 case 125:
262 case 150:
263 break;
264 default:
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000265 ftp_die("STOR");
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000266 }
267
268 /* transfer the file */
Glenn L McGrath7ffe1332003-11-21 22:24:57 +0000269 if (bb_copyfd_eof(fd_local, fd_data) == -1) {
Denis Vlasenko6c615a62008-03-28 22:11:49 +0000270 /* error msg is already printed by bb_copyfd_eof */
271 return EXIT_FAILURE;
Glenn L McGrath25fe94f2002-12-13 08:20:44 +0000272 }
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000273
274 /* close it all down */
275 close(fd_data);
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000276 if (ftpcmd(NULL, NULL, control_stream) != 226) {
277 ftp_die("close");
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000278 }
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000279 ftpcmd("QUIT", NULL, control_stream);
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000280
Denis Vlasenko079f8af2006-11-27 16:49:31 +0000281 return EXIT_SUCCESS;
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000282}
283#endif
284
Glenn L McGrathb51eb262003-12-19 10:37:52 +0000285#define FTPGETPUT_OPT_CONTINUE 1
286#define FTPGETPUT_OPT_VERBOSE 2
287#define FTPGETPUT_OPT_USER 4
288#define FTPGETPUT_OPT_PASSWORD 8
289#define FTPGETPUT_OPT_PORT 16
290
Bernhard Reutner-Fischer01d23ad2006-05-26 20:19:22 +0000291#if ENABLE_FEATURE_FTPGETPUT_LONG_OPTIONS
Denis Vlasenko6ca409e2007-08-12 20:58:27 +0000292static const char ftpgetput_longopts[] ALIGN1 =
Denis Vlasenkobdc88fd2007-07-23 17:14:14 +0000293 "continue\0" Required_argument "c"
294 "verbose\0" No_argument "v"
295 "username\0" Required_argument "u"
296 "password\0" Required_argument "p"
297 "port\0" Required_argument "P"
Denis Vlasenko990d0f62007-07-24 15:54:42 +0000298 ;
Bernhard Reutner-Fischer01d23ad2006-05-26 20:19:22 +0000299#endif
Glenn L McGrathb51eb262003-12-19 10:37:52 +0000300
Denis Vlasenko9b49a5e2007-10-11 10:05:36 +0000301int ftpgetput_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
Denis Vlasenko68404f12008-03-17 09:00:54 +0000302int ftpgetput_main(int argc ATTRIBUTE_UNUSED, char **argv)
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000303{
Denis Vlasenko67b23e62006-10-03 21:00:06 +0000304 unsigned opt;
Denis Vlasenko562dc242007-01-03 21:55:50 +0000305 const char *port = "ftp";
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000306 /* socket to ftp server */
307 FILE *control_stream;
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000308
Denis Vlasenko562dc242007-01-03 21:55:50 +0000309#if ENABLE_FTPPUT && !ENABLE_FTPGET
310# define ftp_action ftp_send
311#elif ENABLE_FTPGET && !ENABLE_FTPPUT
312# define ftp_action ftp_receive
313#else
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000314 int (*ftp_action)(FILE *, const char *, char *) = ftp_send;
315
Glenn L McGrath266c1f52003-12-20 03:19:27 +0000316 /* Check to see if the command is ftpget or ftput */
Denis Vlasenko562dc242007-01-03 21:55:50 +0000317 if (applet_name[3] == 'g') {
Bernhard Reutner-Fischere0387a62006-06-07 13:31:59 +0000318 ftp_action = ftp_receive;
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000319 }
Denis Vlasenko562dc242007-01-03 21:55:50 +0000320#endif
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000321
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000322 INIT_G();
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000323 /* Set default values */
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000324 user = "anonymous";
325 password = "busybox@";
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000326
Eric Andersenc7bda1c2004-03-15 08:29:22 +0000327 /*
328 * Decipher the command line
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000329 */
Denis Vlasenkoc61852a2006-11-29 11:09:43 +0000330#if ENABLE_FEATURE_FTPGETPUT_LONG_OPTIONS
Denis Vlasenkobdc88fd2007-07-23 17:14:14 +0000331 applet_long_options = ftpgetput_longopts;
Denis Vlasenkoc61852a2006-11-29 11:09:43 +0000332#endif
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000333 opt_complementary = "=3:vv:cc"; /* must have 3 params; -v and -c count */
334 opt = getopt32(argv, "cvu:p:P:", &user, &password, &port,
335 &verbose_flag, &do_continue);
Denis Vlasenko562dc242007-01-03 21:55:50 +0000336 argv += optind;
Glenn L McGrath236e93d2003-12-20 05:43:34 +0000337
Eric Andersen04d055f2003-11-03 21:20:18 +0000338 /* We want to do exactly _one_ DNS lookup, since some
339 * sites (i.e. ftp.us.debian.org) use round-robin DNS
340 * and we want to connect to only one IP... */
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000341 lsa = xhost2sockaddr(argv[0], bb_lookup_port(port, "tcp", 21));
Eric Andersen04d055f2003-11-03 21:20:18 +0000342 if (verbose_flag) {
Denis Vlasenko85629f02007-01-22 09:36:41 +0000343 printf("Connecting to %s (%s)\n", argv[0],
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000344 xmalloc_sockaddr2dotted(&lsa->u.sa));
Eric Andersen04d055f2003-11-03 21:20:18 +0000345 }
346
347 /* Connect/Setup/Configure the FTP session */
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000348 control_stream = ftp_login();
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000349
Denis Vlasenko0e7940a2008-03-29 07:37:42 +0000350 return ftp_action(control_stream, argv[1], argv[2]);
Glenn L McGrath02d7cbf2002-12-13 02:43:50 +0000351}