From owner-freebsd-bugs Sat Sep 23 17: 0:27 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 2CE7937B43E for ; Sat, 23 Sep 2000 17:00:07 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id RAA91165; Sat, 23 Sep 2000 17:00:07 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Sat, 23 Sep 2000 17:00:07 -0700 (PDT) Message-Id: <200009240000.RAA91165@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: djhill@novagate.net Subject: misc/21494: ftpd doesn't count Reply-To: djhill@novagate.net Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR misc/21494; it has been noted by GNATS. From: djhill@novagate.net To: freebsd-gnats-submit@FreeBSD.ORG Cc: Subject: misc/21494: ftpd doesn't count Date: Fri, 22 Sep 2000 22:56:38 -0700 (PDT) >Number: 21494 >Category: misc >Synopsis: ftpd doesn't count >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Sep 22 23:00:01 PDT 2000 >Closed-Date: >Last-Modified: >Originator: David Hill >Release: 4.1 >Organization: >Environment: FreeBSD beast.hill.hom 4.1-STABLE FreeBSD 4.1-STABLE #5: Thu Sep 14 17:00:50 EDT 2000 root@beast.hill.hom:/usr/src/sys/compile/BEAST i386 >Description: When adding a user to /etc/ftpchroot without hitting enter at the end (does not at \n), ftpd will fail to check the username. Ok, maybe I am being picky, but when I had to add only one username to /etc/ftpchroot, and it wasn't working, I finally remembered to hit enter. A patch is available below (could it hurt it add it?) >How-To-Repeat: add a user to /etc/ftpchroot without hitting enter at the end. >Fix: --- ftpd.c.orig Wed Sep 20 05:57:57 2000 +++ ftpd.c Sat Sep 23 01:53:33 2000 @@ -977,7 +977,7 @@ if ((fd = fopen(fname, "r")) != NULL) { while (!found && fgets(line, sizeof(line), fd) != NULL) - if ((p = strchr(line, '\n')) != NULL) { + if (((p = strchr(line, '\n')) != NULL) || (p = strchr(line, '\0')) != NULL) { *p = '\0'; if (line[0] == '#') continue; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message