[PATCH] setup ftpd root before task start

Xiangfu Liu xiangfu at sharism.cc
Wed Dec 21 02:04:29 UTC 2011


Hi

sorry, forget describe the bug. here is our ftpd configuration:
~~~
struct rtems_ftpd_configuration rtems_ftpd_configuration = {
	20,			/* FTPD task priority */
	512*1024,		/* Maximum hook 'file' size */
	0,			/* Use default port */
	ftp_hooks,		/* Local ftp hooks */
	"/ssd/",		/* Root */
	3,			/* Task count */
	3600,			/* Idle timeout */
	0,			/* Access */
	sysconfig_login_check	/* Login */
};
~~~

without this patch the FTPD_ROOT never works. by look into
'cpukit/ftpd/ftpd.c' function: 'session(rtems_task_argument arg)'

the first time it try to 'chroot(ftpd_root)' the ftpd_root still
not setup to '/ssd/'. but this function success return. which make
the second 'chroot(ftpd_root)' never called.

this patch just move the ftpd root dir setup before the task start.
then it will setup the 'ftpd_root' before run function 'session'

xiangfu

On 12/21/2011 02:18 AM, Gedare Bloom wrote:
> Does this patch fix some bug / what is the reason for it?




More information about the devel mailing list