Date: Fri, 22 Sep 2000 22:56:38 -0700 (PDT) From: djhill@novagate.net To: freebsd-gnats-submit@FreeBSD.org Subject: misc/21494: ftpd doesn't count Message-ID: <20000923055638.46D4B37B422@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000923055638.46D4B37B422>