Debian bug report logs - #1560 , boring messages ----------------------------------------------------------------------- Message sent to debian-devel@pixar.com: Subject: Bug#1560: `su' produces incomplete log entries when not in ordinary session Reply-To: Ian Jackson , debian-bugs@pixar.com Resent-From: Ian Jackson Resent-To: debian-devel@pixar.com Resent-Date: Sat, 07 Oct 1995 17:48:03 GMT Resent-Message-ID: Resent-Sender: iwj10@cus.cam.ac.uk X-Debian-PR-Package: shellutils X-Debian-PR-Keywords: Received: via spool for debian-bugs; Sat, 07 Oct 1995 17:48:03 GMT Received: with rfc822 via encapsulated-mail; Sat, 07 Oct 1995 17:38:03 GMT Received: from pixar.com by mongo.pixar.com with smtp (Smail3.1.28.1 #15) id m0t1dBE-000HtBC; Sat, 7 Oct 95 10:37 PDT Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA02134 (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Sat, 7 Oct 1995 10:36:37 -0700 Received: by bootes.cus.cam.ac.uk (Smail-3.1.29.0 #36) id m0t1dB9-000BzQC; Sat, 7 Oct 95 18:36 BST Received: by chiark id (Debian /\oo/\ Smail3.1.29.1 #29.33); Sat, 7 Oct 95 17:50 BST Message-Id: Date: Sat, 7 Oct 95 17:50 BST From: Ian Jackson To: Debian bugs submission address Package: shellutils Version: 1.12-3 It looks like `su' uses the utmp username field for logging who is doing the su. This is broken, because (a) it doesn't work at all if the process doesn't have a controlling tty and (b) it may give the wrong answer if utmp is corrupted. The correct algorithm is to use the utmp username field as a hint: it should be used if there is a relevant utmp entry and the username in it has (according to getpwnam) as a uid the ruid of the su process; otherwise a getpwuid should be done and the name from that used. Here are some examples of silly log entries: Sep 15 08:04:53 chiark su: (to news) on /dev/console Sep 17 06:42:01 chiark su: (to nobody) on Ian. ----------------------------------------------------------------------- Message sent: From: iwj10@thor.cam.ac.uk (Ian Jackson) To: Ian Jackson Subject: Bug#1560: Acknowledgement (was: `su' produces incomplete log entries when not in ordinary session) In-Reply-To: References: Thank you for the problem report you have sent regarding Debian GNU/Linux. This is an automatically generated reply, to let you know your message has been received. It is being forwarded to the developers' mailing list for their attention; they will reply in due course. If you wish to submit further information on your problem, please send it to debian-bugs@pixar.com, but please ensure that the Subject line of your message starts with "Bug#1560" or "Re: Bug#1560" so that we can identify it as relating to the same problem. Please do not reply to the address at the top of this message, unless you wish to report a problem with the bug-tracking system. Ian Jackson (maintainer, debian-bugs) ----------------------------------------------------------------------- Ian Jackson / iwj10@thor.cam.ac.uk , with the debian-bugs tracking mechanism This page last modified 07:43:01 GMT Wed 01 Nov