NetBSD Problem Report #1571

From gnats  Thu Oct  5 22:19:49 1995
Received: from darling.idt.unit.no (root@darling.idt.unit.no [129.241.111.171]) by sun-lamp.pc.cs.cmu.edu (8.6.11/8.6.10) with ESMTP id WAA00586 for <gnats-bugs@gnats.netbsd.org>; Thu, 5 Oct 1995 22:19:48 -0400
Message-Id: <199510041513.QAA05190@darling.idt.unit.no>
Date: Wed, 4 Oct 1995 16:13:32 +0100
From: jarle@idt.unit.no
Reply-To: jarle@idt.unit.no
To: gnats-bugs@gnats.netbsd.org
Subject: ftpd should use LOG_AUTHPRIV when logging failed logins
X-Send-Pr-Version: 3.95

>Number:         1571
>Category:       bin
>Synopsis:       ftpd should use LOG_AUTHPRIV when logging failed logins
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 05 22:20:10 +0000 1995
>Closed-Date:    Thu May 29 13:23:16 +0000 1997
>Last-Modified:  Thu May 29 13:23:34 +0000 1997
>Originator:     Jarle Greipsland
>Release:        01.10.95
>Organization:
Confidential Softwar Foundation

>Environment:

System: NetBSD darling.idt.unit.no 1.0A NetBSD 1.0A (DARLING) #7: Mon Oct 2 22:45:19 MET 1995 jarle@darling.idt.unit.no:/usr/src/sys/arch/i386/compile/DARLING i386


>Description:
The current ftpd uses LOG_NOTICE and the default facility of LOG_FTP even
when it's logging user names on failed login attempts.  This implies that
what is specified as the username will get logged into whatever file
LOG_FTP|LOG_NOTICE goes into.  Users that mistakenly give their passwd as
the login name will have their passwd logged for all(?) to see.  I am of
the opinion that failed login attempts should be logged with the
LOG_AUTHPRIV facility.


>How-To-Repeat:
`Fail' a login attempt with ftp, and then search whatever log file(s) ftpd
logs to for your username.

>Fix:

*** ftpd.c.orig	Wed Oct  4 15:31:41 1995
--- ftpd.c	Wed Oct  4 15:36:39 1995
***************
*** 455,462 ****
  		if (cp == NULL || checkuser(_PATH_FTPUSERS, name)) {
  			reply(530, "User %s access denied.", name);
! 			if (logging)
  				syslog(LOG_NOTICE,
  				    "FTP LOGIN REFUSED FROM %s, %s",
  				    remotehost, name);
  			pw = (struct passwd *) NULL;
  			return;
--- 455,465 ----
  		if (cp == NULL || checkuser(_PATH_FTPUSERS, name)) {
  			reply(530, "User %s access denied.", name);
! 			if (logging) {
  				syslog(LOG_NOTICE,
+ 				    "FTP LOGIN REFUSED FROM %s", remotehost);
+ 				syslog(LOG_AUTHPRIV|LOG_NOTICE,
  				    "FTP LOGIN REFUSED FROM %s, %s",
  				    remotehost, name);
+ 			}
  			pw = (struct passwd *) NULL;
  			return;
***************
*** 575,582 ****
  		if (rval) {
  			reply(530, "Login incorrect.");
! 			if (logging)
  				syslog(LOG_NOTICE,
  				    "FTP LOGIN FAILED FROM %s, %s",
  				    remotehost, curname);
  			pw = NULL;
  			if (login_attempts++ >= 5) {
--- 578,588 ----
  		if (rval) {
  			reply(530, "Login incorrect.");
! 			if (logging) {
  				syslog(LOG_NOTICE,
+ 				    "FTP LOGIN FAILED FROM %s", remotehost);
+ 				syslog(LOG_AUTHPRIV|LOG_NOTICE,
  				    "FTP LOGIN FAILED FROM %s, %s",
  				    remotehost, curname);
+ 			}
  			pw = NULL;
  			if (login_attempts++ >= 5) {

						-jarle
-- 
"The Circus Theory of Project Management: If you have too many balls in
 the air, throw one to some other clown..."
                                        -- arch@cisco.com
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: lukem 
State-Changed-When: Thu May 29 06:23:16 PDT 1997 
State-Changed-Why:  
fixed now. thanks for the bug report. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.