From owner-freebsd-bugs@FreeBSD.ORG Thu Dec 17 04:00:06 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F24441065670 for ; Thu, 17 Dec 2009 04:00:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D801B8FC14 for ; Thu, 17 Dec 2009 04:00:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nBH406iR017338 for ; Thu, 17 Dec 2009 04:00:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nBH406aO017337; Thu, 17 Dec 2009 04:00:06 GMT (envelope-from gnats) Date: Thu, 17 Dec 2009 04:00:06 GMT Message-Id: <200912170400.nBH406aO017337@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Holger Kunst Cc: Subject: Re: bin/75378: login(1): login/wtmp/utmp not updating properly X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Holger Kunst List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Dec 2009 04:00:07 -0000 The following reply was made to PR bin/75378; it has been noted by GNATS. From: Holger Kunst To: bug-followup@FreeBSD.org, brandon@elitenj.net Cc: Subject: Re: bin/75378: login(1): login/wtmp/utmp not updating properly Date: Wed, 16 Dec 2009 22:29:48 -0500 I am experiencing the same problem. I am happy to provide more detail if required. The "at" command sends an email with the output of the scheduled job. I've experienced inconsistent results when running jobs, receiving emails in accounts not associated with the user currently logged in. To reproduce in FreeBSD 7.2-RELEASE-p2 Case #1 login as user a (new shell through ssh) echo "echo 1" | at now --> user a will receive an email containing "1" - this is as expected Case #2 login as user a (new shell through ssh) login as user b exit echo "echo 1" | at now --> user b will receive an email containing "1" - this is not as expected, since I am user a again A look at the source for "at" reveals that "at" is getting the mailname from getlogin(). Running a small test program that outputs getlogin(), confirms the above behavior: A log-in and out of another account makes getlogin() return that account's name, even though the shell has been closed and we are back to the original shell and the original user a. Holger