aboutsummaryrefslogtreecommitdiff
path: root/networking/ftpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/ftpd.c')
-rw-r--r--networking/ftpd.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/networking/ftpd.c b/networking/ftpd.c
index 104d414de..439608ce6 100644
--- a/networking/ftpd.c
+++ b/networking/ftpd.c
@@ -61,12 +61,12 @@
61//usage: "Can be run from tcpsvd:\n" 61//usage: "Can be run from tcpsvd:\n"
62//usage: " tcpsvd -vE 0.0.0.0 21 ftpd /files/to/serve\n" 62//usage: " tcpsvd -vE 0.0.0.0 21 ftpd /files/to/serve\n"
63//usage: "\n -w Allow upload" 63//usage: "\n -w Allow upload"
64//usage: "\n -v Log errors to stderr. -vv: verbose log"
65//usage: "\n -S Log errors to syslog. -SS: verbose log"
66//usage: IF_FEATURE_FTPD_AUTHENTICATION( 64//usage: IF_FEATURE_FTPD_AUTHENTICATION(
67//usage: "\n -a USER Enable 'anonymous' login and map it to USER" 65//usage: "\n -a USER Enable 'anonymous' login and map it to USER"
68//usage: ) 66//usage: )
69//usage: "\n -t,-T Idle and absolute timeouts" 67//usage: "\n -v Log errors to stderr. -vv: verbose log"
68//usage: "\n -S Log errors to syslog. -SS: verbose log"
69//usage: "\n -t,-T N Idle and absolute timeout"
70 70
71#include "libbb.h" 71#include "libbb.h"
72#include "common_bufsiz.h" 72#include "common_bufsiz.h"
@@ -701,7 +701,7 @@ popen_ls(const char *opt)
701 dup(STDOUT_FILENO); /* copy will become STDIN_FILENO */ 701 dup(STDOUT_FILENO); /* copy will become STDIN_FILENO */
702#if BB_MMU 702#if BB_MMU
703 /* memset(&G, 0, sizeof(G)); - ls_main does it */ 703 /* memset(&G, 0, sizeof(G)); - ls_main does it */
704 exit(ls_main(ARRAY_SIZE(argv) - 1, (char**) argv)); 704 exit(ls_main(/*argc_unused*/ 0, (char**) argv));
705#else 705#else
706 cur_fd = xopen(".", O_RDONLY | O_DIRECTORY); 706 cur_fd = xopen(".", O_RDONLY | O_DIRECTORY);
707 /* On NOMMU, we want to execute a child - copy of ourself 707 /* On NOMMU, we want to execute a child - copy of ourself
@@ -1152,11 +1152,7 @@ enum {
1152}; 1152};
1153 1153
1154int ftpd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 1154int ftpd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
1155#if !BB_MMU
1156int ftpd_main(int argc, char **argv)
1157#else
1158int ftpd_main(int argc UNUSED_PARAM, char **argv) 1155int ftpd_main(int argc UNUSED_PARAM, char **argv)
1159#endif
1160{ 1156{
1161#if ENABLE_FEATURE_FTPD_AUTHENTICATION 1157#if ENABLE_FEATURE_FTPD_AUTHENTICATION
1162 struct passwd *pw = NULL; 1158 struct passwd *pw = NULL;
@@ -1184,11 +1180,10 @@ int ftpd_main(int argc UNUSED_PARAM, char **argv)
1184 &G.verbose, &verbose_S); 1180 &G.verbose, &verbose_S);
1185 if (opts & (OPT_l|OPT_1)) { 1181 if (opts & (OPT_l|OPT_1)) {
1186 /* Our secret backdoor to ls */ 1182 /* Our secret backdoor to ls */
1187/* TODO: pass --group-directories-first? */
1188 if (fchdir(3) != 0) 1183 if (fchdir(3) != 0)
1189 _exit(127); 1184 _exit(127);
1190 /* memset(&G, 0, sizeof(G)); - ls_main does it */ 1185 /* memset(&G, 0, sizeof(G)); - ls_main does it */
1191 return ls_main(argc, argv); 1186 return ls_main(/*argc_unused*/ 0, argv);
1192 } 1187 }
1193#endif 1188#endif
1194 if (G.verbose < verbose_S) 1189 if (G.verbose < verbose_S)