From owner-freebsd-bugs Sun Jan 12 17:10:05 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id RAA08272 for bugs-outgoing; Sun, 12 Jan 1997 17:10:05 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id RAA08266; Sun, 12 Jan 1997 17:10:03 -0800 (PST) Resent-Date: Sun, 12 Jan 1997 17:10:03 -0800 (PST) Resent-Message-Id: <199701130110.RAA08266@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, Received:"from methan.chemie.fu-berlin.de (methan.chemie.fu-berlin.de [160.45.22.81]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id RAA07769 for" ; Sun, 12 Jan 1997 17:00:37.-0800 (PST) Received: by methan.chemie.fu-berlin.de (Smail3.1.29.1) id ; Mon, 13 Jan 97 02:00 MET Received: (from dirk@localhost) by hal.IN-Berlin.DE (8.8.4/8.8.4) id BAA15568; Mon, 13 Jan 1997 01:58:17 +0100 (MET) Message-Id: <199701130058.BAA15568@hal.IN-Berlin.DE> Date: Mon, 13 Jan 1997 01:58:17 +0100 (MET) From: dirk@hal.in-berlin.de (Dirk Froemberg) To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/2474: too much wtmp entries with pppd Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 2474 >Category: bin >Synopsis: too much wtmp entries with pppd >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jan 12 17:10:01 PST 1997 >Last-Modified: >Originator: Dirk Froemberg >Organization: >Release: FreeBSD 2.2-RELEASE i386 >Environment: FreeBSD-2.2, pppd-2.2 >Description: When using pppd with the option 'login' (use system passwd database for authentication) two wtmp-entries are written for each login. (Another is written when logging out, of course. Thus three entries are added to the wtmp file.) >How-To-Repeat: see above >Fix: The following patch seems to be sufficient for the pppd. Another fix would be not to write a wtmp entry with login(3). BTW: login(3) und logout(3) behave inconsistently somehow, because logout(3) just clears the utmp entry... *** /usr/src/usr.sbin/pppd/auth.c.dist Tue Dec 31 00:36:23 1996 --- /usr/src/usr.sbin/pppd/auth.c Mon Jan 13 01:50:04 1997 *************** *** 524,530 **** if (strncmp(tty, "/dev/", 5) == 0) tty += 5; ! logwtmp(tty, user, ":PPP"); /* Add wtmp login entry */ logged_in = TRUE; /* Log in utmp too */ --- 524,530 ---- if (strncmp(tty, "/dev/", 5) == 0) tty += 5; ! /* logwtmp(tty, user, ":PPP"); /* Add wtmp login entry */ logged_in = TRUE; /* Log in utmp too */ >Audit-Trail: >Unformatted: