From owner-freebsd-bugs@FreeBSD.ORG Sat Apr 19 12:30:19 2003 Return-Path: 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 205F937B401 for ; Sat, 19 Apr 2003 12:30:19 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id CFB9343FE0 for ; Sat, 19 Apr 2003 12:30:17 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h3JJUHUp057010 for ; Sat, 19 Apr 2003 12:30:17 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h3JJUH0X057009; Sat, 19 Apr 2003 12:30:17 -0700 (PDT) Resent-Date: Sat, 19 Apr 2003 12:30:17 -0700 (PDT) Resent-Message-Id: <200304191930.h3JJUH0X057009@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, =?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?= Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 41F1337B401 for ; Sat, 19 Apr 2003 12:22:54 -0700 (PDT) Received: from mta7.pltn13.pbi.net (mta7.pltn13.pbi.net [64.164.98.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id A395643FDF for ; Sat, 19 Apr 2003 12:22:53 -0700 (PDT) (envelope-from mbsd@pacbell.net) Received: from atlas (adsl-64-160-45-145.dsl.snfc21.pacbell.net [64.160.45.145]) by mta7.pltn13.pbi.net (8.12.9/8.12.3) with ESMTP id h3JJMrMc006573 for ; Sat, 19 Apr 2003 12:22:53 -0700 (PDT) Message-Id: <20030419121839.U345@atlas.home> Date: Sat, 19 Apr 2003 12:22:53 -0700 (PDT) From: =?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?= To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/51165: Login does not (fully) honor .hushlogin X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Apr 2003 19:30:19 -0000 >Number: 51165 >Category: bin >Synopsis: Login does not honor .hushlogin >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Apr 19 12:30:17 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Mikko Työläjärvi >Release: FreeBSD 5.0-CURRENT i386 >Organization: >Environment: System: FreeBSD sotec.home 5.0-CURRENT FreeBSD 5.0-CURRENT #12: Tue Apr 15 20:23:34 PDT 2003 mikko@sotec.home:/usr/obj/usr/src/sys/SOTEC i386 >Description: Login does not suppress the "Last login" message (from pam_lastlog) when $HOME/.hushlogin exists. Having "hushlogin" in login.conf does work work. If this is unintentional, apply the patch below. Otherwise change login(1) and login.conf(5), which claim that having a ".hushlogin" file suppresses all messages, and that the "hushlogin" capability is equivalent to having a ".hushlogin" file. >How-To-Repeat: Create ~/.hushlogin. Log in on console, via rlogin or via telnet. "Last login" message is printed. >Fix: --- /usr/src/usr.bin/login/login.c Sat Feb 15 19:33:44 2003 +++ login.c Sat Apr 19 12:03:08 2003 @@ -356,8 +356,6 @@ lc = login_getpwclass(pwd); quietlog = login_getcapbool(lc, "hushlogin", 0); - if (!quietlog) - pam_silent = 0; /* * Switching needed for NFS with root access disabled. @@ -385,6 +383,8 @@ (void)setegid(egid); if (!quietlog) quietlog = access(_PATH_HUSHLOGIN, F_OK) == 0; + if (!quietlog) + pam_silent = 0; shell = login_getcapstr(lc, "shell", pwd->pw_shell, pwd->pw_shell); if (*pwd->pw_shell == '\0') >Release-Note: >Audit-Trail: >Unformatted: