From owner-freebsd-bugs Wed Aug 28 5:20:17 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C5FB37B400 for ; Wed, 28 Aug 2002 05:20:03 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 95C7443E81 for ; Wed, 28 Aug 2002 05:20:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7SCK2JU055244 for ; Wed, 28 Aug 2002 05:20:02 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7SCK2Ok055243; Wed, 28 Aug 2002 05:20:02 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D95DE37B400 for ; Wed, 28 Aug 2002 05:12:45 -0700 (PDT) Received: from calahan.bsdunix.ch (zux187-250.adsl.green.ch [80.254.187.250]) by mx1.FreeBSD.org (Postfix) with ESMTP id B5C1443E97 for ; Wed, 28 Aug 2002 05:12:43 -0700 (PDT) (envelope-from turbo@bsdunix.ch) Received: from calahan.bsdunix.ch (localhost [127.0.0.1]) by calahan.bsdunix.ch (8.12.5/8.12.5) with ESMTP id g7SCBAjn028844 for ; Wed, 28 Aug 2002 14:11:11 +0200 (CEST) (envelope-from turbo@bsdunix.ch) Received: (from turbo@localhost) by calahan.bsdunix.ch (8.12.5/8.12.5/Submit) id g7SCBAs9028843; Wed, 28 Aug 2002 14:11:10 +0200 (CEST) Message-Id: <200208281211.g7SCBAs9028843@calahan.bsdunix.ch> Date: Wed, 28 Aug 2002 14:11:10 +0200 (CEST) From: Thomas Vogt Reply-To: Thomas Vogt To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/42122: ftpchroot problem with lukemftpd Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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