Support for authentication in ftpd

Arnout Vandecappelle arnout at
Wed Apr 28 12:29:58 UTC 2010

On Wednesday 28 April 2010 14:13:19, Joel Sherrill wrote:
> On 04/28/2010 03:23 AM, Arnout Vandecappelle wrote:
> >   Hoi all,
> >
> >   I'm going to add some form of authentication to ftpd.  The idea is
> > that I'll add a hook function to the configuration that returns
> > permissions per file or directory on which an operation is executed. 
> > It would be used instead of the global access configuration (with the
> > global access configuration as a fall-back).
> >
> >   Is anybody else interested?  Any remarks or other approaches I should
> > consider?
> I think it would be a nice feature especially if it followed
> the format of the login plugin setup for telnetd.  Then
> an authentication engine could work with either one.

 Unfortunately, that won't work.  I need to give some users read-only access 
and other read-write access.  So the boolean return value of 
rtems_telnetd_login_check() is not enough.  And also if you want per-file 
control in ftpd that won't work.

 One option would be to define a union type that identifies the requested 
resource as the third parameter to rtems_login_check().  It could be 
something like:

struct rtems_login_request_t {
  enum {rtems_login_telnet, rtems_login_ftp_read, rtems_login_ftp_write, 
rtems_login_ftp_list, rtems_login_fs_read, rtems_login_fs_write, 
rtems_login_fs_list} resource;
 union {
   struct {
     char *filename;
   } ftp;
   struct {
     char *filename;
   } fs;

Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile:
GPG fingerprint:  31BB CF53 8660 6F88 345D  54CC A836 5879 20D7 CF43

More information about the users mailing list