From owner-freebsd-bugs Sun Aug 11 14:10:16 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 EFD0337B400 for ; Sun, 11 Aug 2002 14:10:07 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 59C1343E7B for ; Sun, 11 Aug 2002 14:10:07 -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 g7BLA7JU065579 for ; Sun, 11 Aug 2002 14:10:07 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7BLA7X6065574; Sun, 11 Aug 2002 14:10:07 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2AEAE37B400 for ; Sun, 11 Aug 2002 14:08:56 -0700 (PDT) Received: from staff.seccuris.com (staff.seccuris.com [204.112.0.40]) by mx1.FreeBSD.org (Postfix) with SMTP id 67E5F43E81 for ; Sun, 11 Aug 2002 14:08:55 -0700 (PDT) (envelope-from cperon@staff.seccuris.com) Received: (qmail 97915 invoked by uid 1006); 11 Aug 2002 21:33:21 -0000 Message-Id: <20020811213321.97914.qmail@staff.seccuris.com> Date: 11 Aug 2002 21:33:21 -0000 From: "Chris S.J.Peron" Reply-To: "Chris S.J.Peron" To: FreeBSD-gnats-submit@FreeBSD.org Cc: lukem@netbsd.org X-Send-Pr-Version: 3.113 Subject: bin/41556: [PATCH] wtmp patch for 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: 41556 >Category: bin >Synopsis: [PATCH] wtmp patch for 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: Sun Aug 11 14:10:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Chris S.J. Peron >Release: FreeBSD 4.6-STABLE i386 >Organization: none >Environment: System: FreeBSD xor.sqrt.ca 4.6-STABLE FreeBSD 4.6-STABLE #0: Sun Aug 11 10:56:44 CDT 2002 modulus@xor.sqrt.ca:/usr/src/sys/compile/opcode i386 >Description: A bug in the preprocessor statements for lukemftpd prevent various functions defined in logwtmp.c from being executed. By default logins are not recorded in wtmp (which should be default according to the man page). Also, I am not so sure that the utmp code is working properly either but that is another subject all together. >> Please merge this diff in the source tree and have FreeBSD import the changes once they have been made upstream. << BTW this is an excellent ftpd :-) All my servers are running it now. good job! >How-To-Repeat: login to the ftp server, logout and use last(1) to check for the record. >Fix: diff -ur lukemftpd/CVS/Entries lukemftpd_hacked/CVS/Entries --- lukemftpd/CVS/Entries Sun Aug 11 15:46:59 2002 +++ lukemftpd_hacked/CVS/Entries Sun Aug 11 15:10:17 2002 @@ -13,4 +13,4 @@ /install-sh/1.1.1.1/Thu Jul 19 16:25:06 2001// /lukemftpd.h/1.1.1.2/Thu Mar 14 19:25:30 2002// /todo/1.1.1.2/Thu Mar 14 19:25:30 2002// -D +D/src//// Only in lukemftpd/CVS: Entries.Log diff -ur lukemftpd/src/ftpd.c lukemftpd_hacked/src/ftpd.c --- lukemftpd/src/ftpd.c Thu Mar 14 13:25:32 2002 +++ lukemftpd_hacked/src/ftpd.c Sun Aug 11 15:25:22 2002 @@ -859,7 +859,7 @@ { if (logged_in) { -#ifdef NO_UTMP +#ifndef NO_UTMP if (dowtmp) logwtmp(ttyline, "", ""); if (doutmp) @@ -977,7 +977,7 @@ gidcount = getgroups(sizeof(gidlist), gidlist); /* open wtmp before chroot */ -#ifdef NO_UTMP +#ifndef NO_UTMP if (dowtmp) logwtmp(ttyline, pw->pw_name, remotehost); @@ -2197,7 +2197,7 @@ transflag = 0; if (logged_in) { -#ifdef NO_UTMP +#ifndef NO_UTMP if (dowtmp) logwtmp(ttyline, "", ""); if (doutmp) OR: have the CFLAGS variable in the Makefile -DNO_UTMP ? >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message