From owner-freebsd-current Fri Apr 19 18:17: 8 2002 Delivered-To: freebsd-current@freebsd.org Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by hub.freebsd.org (Postfix) with ESMTP id 8F88937B417; Fri, 19 Apr 2002 18:16:47 -0700 (PDT) Received: from pobrecita.freebsd.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.12.2/8.12.2) with ESMTP id g3K1GhiJ066557; Sat, 20 Apr 2002 05:16:45 +0400 (MSD) (envelope-from ache@pobrecita.freebsd.ru) Received: (from ache@localhost) by pobrecita.freebsd.ru (8.12.3/8.12.2/Submit) id g3K1Gd0t066556; Sat, 20 Apr 2002 05:16:40 +0400 (MSD) Date: Sat, 20 Apr 2002 05:16:35 +0400 From: "Andrey A. Chernov" To: current@freebsd.org, des@freebsd.org Subject: PAM & OpenSSH: two incorrect "last login" Message-ID: <20020420011633.GA66468@nagual.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I got this TWO last login lines with recent -current SSH+PAM: -------------------------- Last login: Sat Apr 20 04:50:45 from hermes.dialup.ru Last login: Sat Apr 20 04:56:06 2002 from hermes.dialup.ru Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994 ... -------------------------- The second one is semi-correct, excepting year not needed here. It is original SSH bug easy to fix, just print first 19 characters and not whole ctime() line in session.c But what about first one? Apparently it comes from pam_lastlog.so, but why there is \n in the middle? Looking at pam_lastlog.c sources I not find \n there. It seems it is inserted afterwards somehow. Notice the second \n after first lastlog line, it must not be there too. Please fix those two \n's. BTW, ONE lastlog line is enough. Please either remove pam_lastlog.so or comment "#ifndef USE_PAM" SSH one. -- Andrey A. Chernov http://ache.pp.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message