diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-11-23 09:07:44 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-11-23 09:07:44 +0100 |
commit | 3148e0c05be2e90def3fbe0da2ecc96094725e41 (patch) | |
tree | cc6137b265df162fcf04cd6166daa65730412122 | |
parent | 47367e1d50b81501e8a6ce215f8be4eeacdda693 (diff) | |
download | busybox-w32-3148e0c05be2e90def3fbe0da2ecc96094725e41.tar.gz busybox-w32-3148e0c05be2e90def3fbe0da2ecc96094725e41.tar.bz2 busybox-w32-3148e0c05be2e90def3fbe0da2ecc96094725e41.zip |
Rename FEATURE_FTP_WRITE and FEATURE_FTP_AUTHENTICATION to *_FTPD_*
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | networking/ftpd.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/networking/ftpd.c b/networking/ftpd.c index d4e6c27ce..bcd60a2ad 100644 --- a/networking/ftpd.c +++ b/networking/ftpd.c | |||
@@ -17,7 +17,7 @@ | |||
17 | //config: help | 17 | //config: help |
18 | //config: simple FTP daemon. You have to run it via inetd. | 18 | //config: simple FTP daemon. You have to run it via inetd. |
19 | //config: | 19 | //config: |
20 | //config:config FEATURE_FTP_WRITE | 20 | //config:config FEATURE_FTPD_WRITE |
21 | //config: bool "Enable upload commands" | 21 | //config: bool "Enable upload commands" |
22 | //config: default y | 22 | //config: default y |
23 | //config: depends on FTPD | 23 | //config: depends on FTPD |
@@ -35,7 +35,7 @@ | |||
35 | //config: it increases the code size by ~40 bytes. | 35 | //config: it increases the code size by ~40 bytes. |
36 | //config: Most other ftp servers seem to behave similar to this. | 36 | //config: Most other ftp servers seem to behave similar to this. |
37 | //config: | 37 | //config: |
38 | //config:config FEATURE_FTP_AUTHENTICATION | 38 | //config:config FEATURE_FTPD_AUTHENTICATION |
39 | //config: bool "Enable authentication" | 39 | //config: bool "Enable authentication" |
40 | //config: default y | 40 | //config: default y |
41 | //config: depends on FTPD | 41 | //config: depends on FTPD |
@@ -151,7 +151,7 @@ struct globals { | |||
151 | len_and_sockaddr *port_addr; | 151 | len_and_sockaddr *port_addr; |
152 | char *ftp_cmd; | 152 | char *ftp_cmd; |
153 | char *ftp_arg; | 153 | char *ftp_arg; |
154 | #if ENABLE_FEATURE_FTP_WRITE | 154 | #if ENABLE_FEATURE_FTPD_WRITE |
155 | char *rnfr_filename; | 155 | char *rnfr_filename; |
156 | #endif | 156 | #endif |
157 | /* We need these aligned to uint32_t */ | 157 | /* We need these aligned to uint32_t */ |
@@ -865,7 +865,7 @@ handle_size_or_mdtm(int need_size) | |||
865 | 865 | ||
866 | /* Upload commands */ | 866 | /* Upload commands */ |
867 | 867 | ||
868 | #if ENABLE_FEATURE_FTP_WRITE | 868 | #if ENABLE_FEATURE_FTPD_WRITE |
869 | static void | 869 | static void |
870 | handle_mkd(void) | 870 | handle_mkd(void) |
871 | { | 871 | { |
@@ -1008,7 +1008,7 @@ handle_stou(void) | |||
1008 | G.restart_pos = 0; | 1008 | G.restart_pos = 0; |
1009 | handle_upload_common(0, 1); | 1009 | handle_upload_common(0, 1); |
1010 | } | 1010 | } |
1011 | #endif /* ENABLE_FEATURE_FTP_WRITE */ | 1011 | #endif /* ENABLE_FEATURE_FTPD_WRITE */ |
1012 | 1012 | ||
1013 | static uint32_t | 1013 | static uint32_t |
1014 | cmdio_get_cmd_and_arg(void) | 1014 | cmdio_get_cmd_and_arg(void) |
@@ -1142,7 +1142,7 @@ enum { | |||
1142 | #endif | 1142 | #endif |
1143 | OPT_v = (1 << ((!BB_MMU) * 3 + 0)), | 1143 | OPT_v = (1 << ((!BB_MMU) * 3 + 0)), |
1144 | OPT_S = (1 << ((!BB_MMU) * 3 + 1)), | 1144 | OPT_S = (1 << ((!BB_MMU) * 3 + 1)), |
1145 | OPT_w = (1 << ((!BB_MMU) * 3 + 2)) * ENABLE_FEATURE_FTP_WRITE, | 1145 | OPT_w = (1 << ((!BB_MMU) * 3 + 2)) * ENABLE_FEATURE_FTPD_WRITE, |
1146 | }; | 1146 | }; |
1147 | 1147 | ||
1148 | int ftpd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | 1148 | int ftpd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; |
@@ -1152,7 +1152,7 @@ int ftpd_main(int argc, char **argv) | |||
1152 | int ftpd_main(int argc UNUSED_PARAM, char **argv) | 1152 | int ftpd_main(int argc UNUSED_PARAM, char **argv) |
1153 | #endif | 1153 | #endif |
1154 | { | 1154 | { |
1155 | #if ENABLE_FEATURE_FTP_AUTHENTICATION | 1155 | #if ENABLE_FEATURE_FTPD_AUTHENTICATION |
1156 | struct passwd *pw = NULL; | 1156 | struct passwd *pw = NULL; |
1157 | #endif | 1157 | #endif |
1158 | unsigned abs_timeout; | 1158 | unsigned abs_timeout; |
@@ -1166,9 +1166,9 @@ int ftpd_main(int argc UNUSED_PARAM, char **argv) | |||
1166 | G.timeout = 2 * 60; | 1166 | G.timeout = 2 * 60; |
1167 | opt_complementary = "vv:SS"; | 1167 | opt_complementary = "vv:SS"; |
1168 | #if BB_MMU | 1168 | #if BB_MMU |
1169 | opts = getopt32(argv, "vS" IF_FEATURE_FTP_WRITE("w") "t:+T:+", &G.timeout, &abs_timeout, &G.verbose, &verbose_S); | 1169 | opts = getopt32(argv, "vS" IF_FEATURE_FTPD_WRITE("w") "t:+T:+", &G.timeout, &abs_timeout, &G.verbose, &verbose_S); |
1170 | #else | 1170 | #else |
1171 | opts = getopt32(argv, "l1AvS" IF_FEATURE_FTP_WRITE("w") "t:+T:+", &G.timeout, &abs_timeout, &G.verbose, &verbose_S); | 1171 | opts = getopt32(argv, "l1AvS" IF_FEATURE_FTPD_WRITE("w") "t:+T:+", &G.timeout, &abs_timeout, &G.verbose, &verbose_S); |
1172 | if (opts & (OPT_l|OPT_1)) { | 1172 | if (opts & (OPT_l|OPT_1)) { |
1173 | /* Our secret backdoor to ls */ | 1173 | /* Our secret backdoor to ls */ |
1174 | /* TODO: pass --group-directories-first? would be nice, but ls doesn't do that yet */ | 1174 | /* TODO: pass --group-directories-first? would be nice, but ls doesn't do that yet */ |
@@ -1231,7 +1231,7 @@ int ftpd_main(int argc UNUSED_PARAM, char **argv) | |||
1231 | WRITE_OK(FTP_GREET); | 1231 | WRITE_OK(FTP_GREET); |
1232 | signal(SIGALRM, timeout_handler); | 1232 | signal(SIGALRM, timeout_handler); |
1233 | 1233 | ||
1234 | #if ENABLE_FEATURE_FTP_AUTHENTICATION | 1234 | #if ENABLE_FEATURE_FTPD_AUTHENTICATION |
1235 | while (1) { | 1235 | while (1) { |
1236 | uint32_t cmdval = cmdio_get_cmd_and_arg(); | 1236 | uint32_t cmdval = cmdio_get_cmd_and_arg(); |
1237 | if (cmdval == const_USER) { | 1237 | if (cmdval == const_USER) { |
@@ -1281,7 +1281,7 @@ int ftpd_main(int argc UNUSED_PARAM, char **argv) | |||
1281 | xchdir(basedir); | 1281 | xchdir(basedir); |
1282 | } | 1282 | } |
1283 | 1283 | ||
1284 | #if ENABLE_FEATURE_FTP_AUTHENTICATION | 1284 | #if ENABLE_FEATURE_FTPD_AUTHENTICATION |
1285 | change_identity(pw); | 1285 | change_identity(pw); |
1286 | #endif | 1286 | #endif |
1287 | 1287 | ||
@@ -1388,7 +1388,7 @@ int ftpd_main(int argc UNUSED_PARAM, char **argv) | |||
1388 | handle_port(); | 1388 | handle_port(); |
1389 | else if (cmdval == const_REST) | 1389 | else if (cmdval == const_REST) |
1390 | handle_rest(); | 1390 | handle_rest(); |
1391 | #if ENABLE_FEATURE_FTP_WRITE | 1391 | #if ENABLE_FEATURE_FTPD_WRITE |
1392 | else if (opts & OPT_w) { | 1392 | else if (opts & OPT_w) { |
1393 | if (cmdval == const_STOR) | 1393 | if (cmdval == const_STOR) |
1394 | handle_stor(); | 1394 | handle_stor(); |
@@ -1428,7 +1428,7 @@ int ftpd_main(int argc UNUSED_PARAM, char **argv) | |||
1428 | * (doesn't necessarily mean "we must support them") | 1428 | * (doesn't necessarily mean "we must support them") |
1429 | * foo 1.2.3: XXXX - comment | 1429 | * foo 1.2.3: XXXX - comment |
1430 | */ | 1430 | */ |
1431 | #if ENABLE_FEATURE_FTP_WRITE | 1431 | #if ENABLE_FEATURE_FTPD_WRITE |
1432 | bad_cmd: | 1432 | bad_cmd: |
1433 | #endif | 1433 | #endif |
1434 | cmdio_write_raw(STR(FTP_BADCMD)" Unknown command\r\n"); | 1434 | cmdio_write_raw(STR(FTP_BADCMD)" Unknown command\r\n"); |