Date: Wed, 28 Aug 2002 14:11:10 +0200 (CEST) From: Thomas Vogt <turbo@bsdunix.ch> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/42122: ftpchroot problem with lukemftpd Message-ID: <200208281211.g7SCBAs9028843@calahan.bsdunix.ch>
next in thread | raw e-mail | index | archive | help
>Number: 42122 >Category: bin >Synopsis: ftpchroot problem with lukemftpd >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Aug 28 05:20:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Thomas Vogt >Release: FreeBSD 4.6-STABLE i386 >Organization: <> >Environment: System: FreeBSD calahan.bsdunix.ch 4.6-STABLE FreeBSD 4.6-STABLE #1: Tue Aug 13 13:22:30 CEST 2002 root@calahan.bsdunix.ch:/usr/obj/usr/src/sys/TURBO i386 >Description: lukemftpd fails to chroot accounts with usernames > 9 characters. >How-To-Repeat: Create a user with > 9 characters and add him to /etc/ftpchroot. >Fix: Work around: Only add the first 9 characters from the username in /etc/ftpchroot. Then the account is chrooted correctly. Fix: Max Khon released a patch in the freebsd-stable mailinglist. Index: ftpd.c =================================================================== RCS file: /home/ncvs/src/contrib/lukemftpd/src/ftpd.c,v retrieving revision 1.1.1.2.2.1 diff -u -p -r1.1.1.2.2.1 ftpd.c --- ftpd.c 30 Jun 2002 06:00:51 -0000 1.1.1.2.2.1 +++ ftpd.c 27 Aug 2002 18:44:04 -0000 @@ -526,10 +526,10 @@ sgetpwnam(const char *name) return (&save); } -static int login_attempts; /* number of failed login attempts */ -static int askpasswd; /* had USER command, ask for PASSwd */ -static int permitted; /* USER permitted */ -static char curname[10]; /* current USER name */ +static int login_attempts; /* number of failed login attempts */ +static int askpasswd; /* had USER command, ask for PASSwd */ +static int permitted; /* USER permitted */ +static char curname[MAXLOGNAME]; /* current USER name */ /* * USER command. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208281211.g7SCBAs9028843>