ftpd: Set current directory after session close

The chroot() is an implicit chdir("/").  Set the current directory to
"/" after session close.  This helps to avoid references to mounted file
systems in dynamic media.
This commit is contained in:
Sebastian Huber
2012-05-29 16:11:46 +02:00
parent 847ad441cd
commit 4da3fef455

View File

@@ -1890,7 +1890,6 @@ session(rtems_task_argument arg)
&set);
chroot_made = chroot_made || chroot(ftpd_root) == 0;
chdir("/");
errno = 0;
@@ -1926,6 +1925,8 @@ session(rtems_task_argument arg)
free(info->user);
free(info->pass);
task_pool_release(info);
chdir("/");
}
}