From owner-freebsd-stable Tue Aug 27 11:45:26 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ADAF737B400 for ; Tue, 27 Aug 2002 11:45:21 -0700 (PDT) Received: from mail.nsu.ru (mx.nsu.ru [193.124.215.71]) by mx1.FreeBSD.org (Postfix) with ESMTP id 903D743E4A for ; Tue, 27 Aug 2002 11:45:11 -0700 (PDT) (envelope-from fjoe@iclub.nsu.ru) Received: from drweb by mail.nsu.ru with drweb-scanned (Exim 3.20 #1) id 17jlKn-0002c6-00; Wed, 28 Aug 2002 01:45:01 +0700 Received: from iclub.nsu.ru ([193.124.215.97] ident=root) by mail.nsu.ru with esmtp (Exim 3.20 #1) id 17jlKm-0002ba-00; Wed, 28 Aug 2002 01:45:00 +0700 Received: from iclub.nsu.ru (fjoe@localhost [127.0.0.1]) by iclub.nsu.ru (8.12.5/8.12.5) with ESMTP id g7RIj0wQ061843; Wed, 28 Aug 2002 01:45:00 +0700 (NSS) (envelope-from fjoe@iclub.nsu.ru) Received: (from fjoe@localhost) by iclub.nsu.ru (8.12.5/8.12.5/Submit) id g7RIj09j061842; Wed, 28 Aug 2002 01:45:00 +0700 (NSS) Date: Wed, 28 Aug 2002 01:44:59 +0700 From: Max Khon To: Jeff Soule Cc: stable@freebsd.org Subject: Re: ftpchroot problem with lukemftpd Message-ID: <20020828014459.A61483@iclub.nsu.ru> References: <200208271122.16665.jsoule@webcrossing.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="k+w/mQv8wyuph6w0" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200208271122.16665.jsoule@webcrossing.com>; from jsoule@webcrossing.com on Tue, Aug 27, 2002 at 11:22:16AM -0700 X-Envelope-To: jsoule@webcrossing.com, stable@freebsd.org Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline hi, there! On Tue, Aug 27, 2002 at 11:22:16AM -0700, Jeff Soule wrote: > Not sure where to post this so.... > > Problem: > lukemftpd fails to chroot accounts with usernames over 9 characters. If I > strip all but the first 9 characters from the username in /etc/ftpchroot the > account is chrooted correctly. > > System: > FreeBSD 4.6-STABLE Stable system built from sources updated on 08/24/02 > SMP kernel > > Questions: > Is this a bug, or just something that I am too blind to see? If it is a bug > where do I report it if not here? > > Thanks in advance for your replies, please try attached patch /fjoe --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="lukemftpd.diff" 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. --k+w/mQv8wyuph6w0-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message