ftpd: fix a case when with -w unknown commands are ignored with no error code
authorDenys Vlasenko <vda.linux@googlemail.com>
Thu, 4 Jun 2009 17:03:20 +0000 (19:03 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 4 Jun 2009 17:03:20 +0000 (19:03 +0200)
Signed-off-by: Stefan Seyfried <seife@suse.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/ftpd.c

index 2ec67df354519d53535a2fafa25b1819fa4c8a65..090ed54ebf06f2ddbee2c41ad9c42877a868817e 100644 (file)
@@ -1320,6 +1320,8 @@ int ftpd_main(int argc UNUSED_PARAM, char **argv)
                                handle_appe();
                        else if (cmdval == const_STOU) /* "store unique" */
                                handle_stou();
+                       else
+                               goto bad_cmd;
                }
 #endif
 #if 0
@@ -1340,6 +1342,9 @@ int ftpd_main(int argc UNUSED_PARAM, char **argv)
                         * (doesn't necessarily mean "we must support them")
                         * foo 1.2.3: XXXX - comment
                         */
+#if ENABLE_FEATURE_FTP_WRITE
+ bad_cmd:
+#endif
                        cmdio_write_raw(STR(FTP_BADCMD)" Unknown command\r\n");
                }
        }