Proftpd V1.2.1, C2, V4.0E - User not Found Error ...

From: Paul R. Querelle <p.r.querelle_at_anglia.ac.uk>
Date: Sun, 25 Mar 2001 01:09:14 +0000

There seem to be a couple of problems with proftpd with C2 on V4.0E:

1. For non-anonymous FTP, a 'User not Found' error occurs.

2. A 'get_svc' error occurs when user's are chroot'ed to a directory
other than '/'.

The first problem can be solved by modifying the 'mod_unixpw.c' file as
follows. It seems that under C2, the encrypted password must be truncated:

MODRET pw_check(cmd_rec *cmd)
{
   static char *pw,*cpw;
   cpw = cmd->argv[0];
   pw = cmd->argv[2];

   /* Add the following line to truncate the encrypted password */
   cpw[13] = 0;

   if(strcmp(crypt(pw,cpw),cpw) != 0) {
      return ERROR(cmd);
   }
   return HANDLED(cmd);
}

The second problem is due to a DU feature/bug which stops 'ls' from working
if '/etc/svc.conf' cannot be found. Obviously, this is pretty vital for an
FTP server! The only solution, as per other posts is to put an empty
'/etc/svc.conf' directory/file in the chroot'ed directory. Seems pretty
lame to me, maybe someone else has a better solution?

Finally, don't worry about the --sendfile problems with proftpd, V4.0E does
not support this, so it's not compiled in by default anyway.

I hope this is of help...

Regards Paul.

P.S. I got a couple of warnings re: 'size_t' type on compilation, but it
seemed to work fine regardless. Maybe the proftpd guys can fix this?
Received on Sun Mar 25 2001 - 00:56:32 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:42 NZDT