Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Jan 1997 01:58:17 +0100 (MET)
From:      dirk@hal.in-berlin.de (Dirk Froemberg)
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/2474: too much wtmp entries with pppd
Message-ID:  <199701130058.BAA15568@hal.IN-Berlin.DE>
Resent-Message-ID: <199701130110.RAA08266@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701130058.BAA15568>