[Bug 1998] New: Specifying ftpd root problems

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Sat Dec 24 16:31:58 UTC 2011


https://www.rtems.org/bugzilla/show_bug.cgi?id=1998

           Summary: Specifying ftpd root problems
           Product: RTEMS
           Version: HEAD
          Platform: All
        OS/Version: RTEMS
            Status: NEW
          Severity: normal
          Priority: P3
         Component: cpukit
        AssignedTo: joel.sherrill at oarcorp.com
        ReportedBy: gedare at rtems.org


Created attachment 1403
  --> https://www.rtems.org/bugzilla/attachment.cgi?id=1403
Assign ftpd root earlier

Bug/patch from rtems-devel.

when configuring ftpd with:

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 */
};

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'

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list