[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [patch] busybox-1.14.1 ftpd: fix unknown command if write enabled
From: Stefan Seyfried <seife () suse ! de>
Date: 2009-05-31 12:36:29
Message-ID: 4A2279CD.1090608 () suse ! de
[Download RAW message or body]
When ftpd is started with "-w", it does no longer recognize unknown
commands - which, in turn, confuses e.g. ncftpput.
(Patch additionally attached in case thunderbird messes it up)
diff -rup busybox-1.14.1/networking/ftpd.c busybox-1.14.1-fixed/networking//ftpd.c
--- busybox-1.14.1/networking/ftpd.c 2009-05-27 18:00:23.000000000 +0200
+++ busybox-1.14.1-fixed/networking//ftpd.c 2009-05-31 14:26:13.713676864 +0200
@@ -1320,8 +1320,10 @@ int ftpd_main(int argc UNUSED_PARAM, cha
handle_appe();
else if (cmdval == const_STOU) /* "store unique" */
handle_stou();
+ else
+ cmdio_write_raw(STR(FTP_BADCMD)" Unknown command\r\n");
}
-#endif
+#else
#if 0
else if (cmdval == const_STOR
|| cmdval == const_MKD
@@ -1342,5 +1344,6 @@ int ftpd_main(int argc UNUSED_PARAM, cha
*/
cmdio_write_raw(STR(FTP_BADCMD)" Unknown command\r\n");
}
+#endif
}
}
Thanks,
Stefan
--
Stefan Seyfried
R&D Team Mobile Devices | "Any ideas, John?"
SUSE LINUX Products GmbH, Nürnberg | "Well, surrounding them's out."
This footer brought to you by insane German lawmakers:
SUSE Linux Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
["busybox-1.14.1-ftpd-write-fix.diff" (text/x-patch)]
diff -rup busybox-1.14.1/networking/ftpd.c busybox-1.14.1-fixed/networking//ftpd.c
--- busybox-1.14.1/networking/ftpd.c 2009-05-27 18:00:23.000000000 +0200
+++ busybox-1.14.1-fixed/networking//ftpd.c 2009-05-31 14:26:13.713676864 +0200
@@ -1320,8 +1320,10 @@ int ftpd_main(int argc UNUSED_PARAM, cha
handle_appe();
else if (cmdval == const_STOU) /* "store unique" */
handle_stou();
+ else
+ cmdio_write_raw(STR(FTP_BADCMD)" Unknown command\r\n");
}
-#endif
+#else
#if 0
else if (cmdval == const_STOR
|| cmdval == const_MKD
@@ -1342,5 +1344,6 @@ int ftpd_main(int argc UNUSED_PARAM, cha
*/
cmdio_write_raw(STR(FTP_BADCMD)" Unknown command\r\n");
}
+#endif
}
}
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic