summaryrefslogtreecommitdiffstats
path: root/cpukit/ftpd
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-02-13 14:17:41 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-02-13 14:19:50 +0100
commit995610e145e68e32945ac65a32e7f0f37d918019 (patch)
tree25b63ff55dc4901dfd4e9ae135113adc892424df /cpukit/ftpd
parentmake: Add default flags (diff)
downloadrtems-995610e145e68e32945ac65a32e7f0f37d918019.tar.bz2
ftpd: Go back to the root directory
Diffstat (limited to 'cpukit/ftpd')
-rw-r--r--cpukit/ftpd/ftpd.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/cpukit/ftpd/ftpd.c b/cpukit/ftpd/ftpd.c
index 3b77b3bf33..0a89bbd920 100644
--- a/cpukit/ftpd/ftpd.c
+++ b/cpukit/ftpd/ftpd.c
@@ -1958,6 +1958,14 @@ session(rtems_task_argument arg)
send_reply(info, 421, "Service not available, closing control connection.");
}
+ /*
+ * Go back to the root directory. A use case is to release a current
+ * directory in a mounted file system on dynamic media, e.g. USB stick.
+ * The return value can be ignored since the next session will try do the
+ * operation again and an error check is performed in this case.
+ */
+ chdir("/");
+
/* Close connection and put ourselves back into the task pool. */
close_data_socket(info);
close_stream(info);