Date: Mon, 27 Oct 1997 21:30:01 -0800 (PST) From: Vasim Valejev <vasim@diaspro.com> To: freebsd-bugs Subject: Re: bin/4862: pppd with PAP logs one user twice in wtmp Message-ID: <199710280530.VAA27357@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/4862; it has been noted by GNATS. From: Vasim Valejev <vasim@diaspro.com> To: Brian Somers <brian@awfulhak.org> Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: bin/4862: pppd with PAP logs one user twice in wtmp Date: Tue, 28 Oct 1997 10:19:24 +0500 (ES) Hi ! On Tue, 28 Oct 1997, Brian Somers wrote: > > when user logging via PAP , pppd creates two records in wtmp file with one username and tty . Example (from last command) : > > > > *** > > baheman ttyd5 :PPP 27 09:44 - 09:44 (00:00) > > baheman ttyd5 27 09:44 still logged in > > *** > > Are you actually "logging in" as well as using pap ? Yes . And this bug appears only in 3.0-CURRENT . In 2.2-STABLE , no logwtmp() call when user logged in and pppd from 2.2-STABLE works fine . For example (on 3.0-CURRENT) : I have mgetty on ttyd* with AUTO_PPP support . mgetty execute next command when receive ppp-handshake : /usr/sbin/pppd -detach modem crtscts auth +pap -chap login lcp-restart 10 pap-max-authreq 1 dns1 $myaddr ms-dns $myaddr name $myname $myaddr:$addr On other machine i run 'ppp papsite' with next /etc/ppp/ppp.conf : default: set device /dev/cuaa0 set speed 57600 set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" ATE1Q0 OK-AT-OK \\dATDP\\T TIMEOUT 40 CONNECT" papsite: set phone ****** set login "" deny chap accept pap # enable pap set authname joe set authkey ******* And last command says after this call : *** joe ttyd5 :PPP ΧΤ 28 ΟΛΤ 09:19 - 09:19 (00:00) joe ttyd5 ΧΤ 28 ΟΛΤ 09:19 still logged in *** (There russian letters in date) It cause problems to my accounting program :( . > This would > explain the duplicate. IMHO, pppd needs a -utmp option for when > people wanna do both. May be . But remove logwtmp call before :) . login(&utmp) appends record in wtmp file and call 'logwtmp(tty, user, remote_name)' in line 913 auth.c not need ! Vasim V. (2:5011/27 http://members.tripod.com/~Vasim VV86-RIPE)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710280530.VAA27357>