Debian Bug report logs - #70084
xterm: user `jsroot'(uid=0) entered into utmp as user `root'

version graph

Package: xterm; Maintainer for xterm is Debian X Strike Force <debian-x@lists.debian.org>; Source for xterm is src:xterm.

Reported by: Jeff Sheinberg <jeffsh@erols.com>

Date: Sun, 27 Aug 2000 18:33:03 UTC

Severity: normal

Found in version 3.3.6-10

Done: branden@deadbeast.net (Branden Robinson)

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Branden Robinson <branden@debian.org>:
Bug#70084; Package xterm. Full text and rfc822 format available.

Acknowledgement sent to Jeff Sheinberg <jeffsh@erols.com>:
New Bug report received and forwarded. Copy sent to Branden Robinson <branden@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Jeff Sheinberg <jeffsh@erols.com>
To: submit@bugs.debian.org
Subject: xterm: user `jsroot'(uid=0) entered into utmp as user `root'
Date: Sun, 27 Aug 2000 14:25:11 -0400 (EDT)
Package: xterm
Version: 3.3.6-10
Severity: normal

Hi,

On my system there are three unique users with userid=0, they are
`root', `sashroot', and `jsroot'.  While logged in on an xterm as
user `jsroot' on `pts/2', I started another xterm which was then
allocated `pts/3' for its use.

The following typescript from `pts/3' shows that its utmp entry
was made for user `root', rather than for user `jsroot'.  In
addition, its environment variable LOGNAME was set to `root' while
USER was set to `jsroot'.

    0=bash, 1=.sh_env, EUID=0, PWD=~jsroot, SHELL=/bin/bash, SHLVL=2
    .sh_env:  *warning*  LOGNAME=root and USER=jsroot
    .sh_env: now setting LOGNAME=jsroot

    1 jsroot ~ # dump-utmp /var/run/utmp | sed 's/  //g'
    ||8|si|6| ||Sun Aug 27 10:09:38 2000
    reboot|~ |2|~~|0| ||Sun Aug 27 10:09:38 2000
    runlevel|~ |1|~~|20018| ||Sun Aug 27 10:09:38 2000
    ||8|l2|254| ||Sun Aug 27 10:09:45 2000
    LOGIN |tty1|6|1 |417| ||Sun Aug 27 10:09:45 2000
    LOGIN |tty2|6|2 |418| ||Sun Aug 27 10:09:45 2000
    LOGIN |tty3|6|3 |419| ||Sun Aug 27 10:09:45 2000
    LOGIN |tty4|6|4 |420| ||Sun Aug 27 10:09:45 2000
    LOGIN |tty5|6|5 |421| ||Sun Aug 27 10:09:45 2000
    LOGIN |tty6|6|6 |422| ||Sun Aug 27 10:09:45 2000
    LOGIN |tty9|6|9 |423| ||Sun Aug 27 10:09:45 2000
    jeff|:0|7|:0|11823|248.252.255.191|console |Sun Aug 27 10:16:45
2000
    jeff|pts/0 |7|/0|11889| |:0.0|Sun Aug 27 10:16:47 2000
    jeff|pts/1 |7|/1|11890| |:0.0|Sun Aug 27 10:16:47 2000
    jsroot|pts/2 |7|/2|11959| |:0.0|Sun Aug 27 10:17:09 2000
    root|pts/3 |7|/3|15235| |:0.0|Sun Aug 27 13:38:02 2000

    2 jsroot ~ # who
    jeff     :0       Aug 27 10:16 (console)
    jeff     pts/0    Aug 27 10:16 (:0.0)
    jeff     pts/1    Aug 27 10:16 (:0.0)
    jsroot   pts/2    Aug 27 10:17 (:0.0)
    root     pts/3    Aug 27 13:38 (:0.0)

    3 jsroot ~ # who am i
    eden-hda7.my.local!root     pts/3    Aug 27 13:38 (:0.0)

Just in case you are wondering exactly how to duplicate this, here
is how.

    I initially logged in via xdm as user `jeff', then I started
    an xterm on `pts/2', then I executed `exec login jsroot',
    which updated utmp for `pts/2' as user `jsroot'.  Then I
    executed `xterm' from `jsroot' on `pts/2', which started on
    `pts/3', from which I copied the above typescript.

Also, I get the same reported behavior from xterm when I just
login as user `jsroot' via xdm.

Note that I get the same behavior from xterm regardless of whether
its `loginShell' resource is true or false.

Thanks,
-- 
Jeff Sheinberg  <jeffsh@erols.com>


-- System Information
Debian Release: 2.2
Kernel Version: Linux eden-hda7.my.local 2.2.17 #1 Sun Jun 25 09:24:41 EST 2000 i586 unknown

Versions of the packages xterm depends on:
ii  libc6          2.1.3-10       GNU C Library: Shared libraries and Timezone
ii  libncurses5    5.0-6          Shared libraries for terminal handling
ii  xlib6g         3.3.6-10       shared libraries required by X clients

--- Begin /etc/X11/Xresources/xterm (modified conffile)
! /etc/X11/Xresources/xterm
! Uncomment the following lines to make xterm appear much like a virtual
! console, so that ANSI colors will make more sense.
! XTerm*background: black
! XTerm*foreground: gray90
! DEC VT series terminal emulators (like xterm) must generate VT220-compliant
! sequences for the backspace and delete keys per the Debian Policy Manual;
! this provides compatibility with the Linux console.  Also, work around an
! apparent bug in the default translations for the home and end keys in
! xterm.  Note that this resource specification affects all programs with a
! "vt100" widget in their resource class hierarchy, and that these
! translation overrides do not apply if one of the listed modifier keys is
! pressed (e.g., what shift-backspace does depends on the program in question).
! Note - These resources are also loaded from the ~/.Xresources file,
!        therefore, all upstream changes need to be copied from this
!        file /etc/X11/Xresources/xterm into your ~/.Xresources file.
*VT100.Translations: #override ~Shift ~Ctrl ~Meta <Key>BackSpace: string("\177")\n\
                               ~Shift ~Ctrl ~Meta <Key>Delete: string("\033[3~")\n\
                               ~Shift ~Ctrl ~Meta <Key>Home: string("\033[1~")\n\
                               ~Shift ~Ctrl ~Meta <Key>End: string("\033[4~")
! /etc/X11/Xresources/xterm - end of file.

--- End /etc/X11/Xresources/xterm




Reply sent to branden@deadbeast.net (Branden Robinson):
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Jeff Sheinberg <jeffsh@erols.com>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #10 received at 70084-done@bugs.debian.org (full text, mbox):

From: branden@deadbeast.net (Branden Robinson)
To: 70084-done@bugs.debian.org
Subject: [dickey@herndon4.his.com: bug report 70084 (xterm)]
Date: Thu, 28 Dec 2000 20:30:01 -0500
[Message part 1 (text/plain, inline)]
Closing this bug per this information from the upstream author.

----- Forwarded message from Thomas Dickey <dickey@herndon4.his.com> -----

From: Thomas Dickey <dickey@herndon4.his.com>
To: Branden Robinson <branden@debian.org>
Subject: bug report 70084 (xterm)
Date: Thu, 28 Dec 2000 20:01:14 -0500
Delivered-To: branden@localhost.deadbeast.net
Delivered-To: branden@deadbeast.net
Message-ID: <20001228200114.A1701@home.reston1.va.home.com>
Reply-To: dickey@herndon4.his.com
User-Agent: Mutt/1.2.5i

I don't think we can make this guy happy - xterm's using getpwuid() to get
an entry from the passwd file, so it will always get the same result (probably
the first one).  I considered making xterm check to see if the current value
of $LOGNAME is consistent, and allow it to select a closer match, but see
a problem: different lines in the passwd file can have different shells
and different home directories.  Some people would consider that a security
issue, since it leaves control over which entry is selected up to the user,
who can set $LOGNAME.

-- 
Thomas E. Dickey <dickey@herndon4.his.com>
http://dickey.his.com
ftp://dickey.his.com

----- End forwarded message -----

-- 
G. Branden Robinson            |    It was a typical net.exercise -- a
Debian GNU/Linux               |    screaming mob pounding on a greasy spot
branden@deadbeast.net          |    on the pavement, where used to lie the
http://deadbeast.net/~branden/ |    carcass of a dead horse.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Branden Robinson <branden@debian.org>:
Bug#70084; Package xterm. Full text and rfc822 format available.

Acknowledgement sent to Jeff Sheinberg <jeffsh@erols.com>:
Extra info received and forwarded to list. Copy sent to Branden Robinson <branden@debian.org>. Full text and rfc822 format available.

Message #15 received at 70084@bugs.debian.org (full text, mbox):

From: Jeff Sheinberg <jeffsh@erols.com>
To: 70084@bugs.debian.org
Subject: Re: Bug#70084 acknowledged by developer ([dickey@herndon4.his.com: bug report 70084 (xterm)])
Date: Sat, 30 Dec 2000 17:22:51 -0500 (EST)
Debian Bug Tracking System writes:
 > ----- Forwarded message from Thomas Dickey <dickey@herndon4.his.com> -----
 > 
 > From: Thomas Dickey <dickey@herndon4.his.com>
 > To: Branden Robinson <branden@debian.org>
 > Subject: bug report 70084 (xterm)
 > Date: Thu, 28 Dec 2000 20:01:14 -0500
 > Delivered-To: branden@localhost.deadbeast.net
 > Delivered-To: branden@deadbeast.net
 > Message-ID: <20001228200114.A1701@home.reston1.va.home.com>
 > Reply-To: dickey@herndon4.his.com
 > User-Agent: Mutt/1.2.5i
 > 
 > I don't think we can make this guy happy - xterm's using getpwuid() to get
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
 > an entry from the passwd file, so it will always get the same result (proba=
 > bly
 > the first one).  I considered making xterm check to see if the current value
 > of $LOGNAME is consistent, and allow it to select a closer match, but see
 > a problem: different lines in the passwd file can have different shells
 > and different home directories.  Some people would consider that a security
 > issue, since it leaves control over which entry is selected up to the user,
 > who can set $LOGNAME.

Hi Branden,

It's very easy to make me happy - don't try to re-invent the
wheel, just follow the established standards.

See Stevens, APUE, p. 232, regarding getlogin(3), and susv2, XSH,
`getlogin.html'.

Thanks,
-- 
Jeff Sheinberg  <jeffsh@erols.com>





Acknowledgement sent to branden@deadbeast.net (Branden Robinson):
Extra info received and filed, but not forwarded. Full text and rfc822 format available.

Message #18 received at 70084-quiet@bugs.debian.org (full text, mbox):

From: branden@deadbeast.net (Branden Robinson)
To: Jeff Sheinberg <jeffsh@erols.com>, 70084-quiet@bugs.debian.org
Subject: [dickey@herndon4.his.com: Re: [jeffsh@erols.com: Bug#70084: acknowledged by developer ([dickey@herndon4.his.com: bug report 70084 (xterm)])]]
Date: Sat, 30 Dec 2000 19:30:15 -0500
[Message part 1 (text/plain, inline)]
----- Forwarded message from Thomas Dickey <dickey@herndon4.his.com> -----

From: Thomas Dickey <dickey@herndon4.his.com>
To: Branden Robinson <branden@deadbeast.net>
Subject: Re: [jeffsh@erols.com: Bug#70084: acknowledged by developer          ([dickey@herndon4.his.com: bug report 70084 (xterm)])]
Date: Sat, 30 Dec 2000 18:48:39 -0500
Delivered-To: branden@localhost.deadbeast.net
Delivered-To: branden@deadbeast.net
Message-ID: <20001230184839.A7644@home.reston1.va.home.com>
Reply-To: dickey@herndon4.his.com
User-Agent: Mutt/1.2.5i
In-Reply-To: <20001230181157.A15893@deadbeast.net>; from branden@deadbeast.net on Sat, Dec 30, 2000 at 06:11:57PM -0500

sure - I can experiment with getlogin().  however, see the comment
in getlogin's manpage:

BUGS
       Unfortunately, it is often rather easy to fool getlogin().
       Sometimes it does not work at all,  because  some  program
       messed  up the utmp file. Often, it gives only the first 8
       characters of the login name. The user currently logged in
       on the controlling tty of our program need not be the user
       who started it.

       Nobody knows precisely what cuserid() does - avoid  it  in
       portable  programs  -  avoid  it  altogether  -  use getp-
       wuid(geteuid()) instead, if that is what you meant. DO NOT
       USE cuserid().

(so I could only use it as supporting info - I'm not sure that it improves
matters immensely, though since utmp _is_ based on names, it is a little
better than $LOGNAME).

On Sat, Dec 30, 2000 at 06:11:57PM -0500, Branden Robinson wrote:
> ----- Forwarded message from Jeff Sheinberg <jeffsh@erols.com> -----
> 
> From: Jeff Sheinberg <jeffsh@erols.com>
> To: 70084@bugs.debian.org
> Subject: Bug#70084: acknowledged by developer          ([dickey@herndon4.his.com: bug report 70084 (xterm)])
> Date: Sat, 30 Dec 2000 17:22:51 -0500 (EST)
> Delivered-To: branden@localhost.deadbeast.net
> Delivered-To: branden@deadbeast.net
> Reply-To: Jeff Sheinberg <jeffsh@erols.com>, 70084@bugs.debian.org
> Resent-From: Jeff Sheinberg <jeffsh@erols.com>
> Resent-To: debian-bugs-dist@lists.debian.org
> Resent-Cc: Branden Robinson <branden@debian.org>
> Resent-Date: Sat, 30 Dec 2000 23:04:03 GMT
> Resent-Message-ID: <handler.70084.B70084.97821497125710@bugs.debian.org>
> Resent-Sender: owner@bugs.debian.org
> X-Debian-PR-Message: report 70084
> X-Debian-PR-Package: xterm
> X-Debian-PR-Keywords: 
> X-Loop: owner@bugs.debian.org
> Message-ID: <14926.24635.114994.234684@eden-hda7.my.local>
> In-Reply-To: <handler.70084.D70084.97805341019573.notifdone@bugs.debian.org>
> X-Mailer: VM 6.75 under Emacs 19.34.1
> Delivered-To: 70084@bugs.debian.org
> 
> Debian Bug Tracking System writes:
>  > ----- Forwarded message from Thomas Dickey <dickey@herndon4.his.com> -----
>  > 
>  > From: Thomas Dickey <dickey@herndon4.his.com>
>  > To: Branden Robinson <branden@debian.org>
>  > Subject: bug report 70084 (xterm)
>  > Date: Thu, 28 Dec 2000 20:01:14 -0500
>  > Delivered-To: branden@localhost.deadbeast.net
>  > Delivered-To: branden@deadbeast.net
>  > Message-ID: <20001228200114.A1701@home.reston1.va.home.com>
>  > Reply-To: dickey@herndon4.his.com
>  > User-Agent: Mutt/1.2.5i
>  > 
>  > I don't think we can make this guy happy - xterm's using getpwuid() to get
>                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
>  > an entry from the passwd file, so it will always get the same result (proba=
>  > bly
>  > the first one).  I considered making xterm check to see if the current value
>  > of $LOGNAME is consistent, and allow it to select a closer match, but see
>  > a problem: different lines in the passwd file can have different shells
>  > and different home directories.  Some people would consider that a security
>  > issue, since it leaves control over which entry is selected up to the user,
>  > who can set $LOGNAME.
> 
> Hi Branden,
> 
> It's very easy to make me happy - don't try to re-invent the
> wheel, just follow the established standards.
> 
> See Stevens, APUE, p. 232, regarding getlogin(3), and susv2, XSH,
> `getlogin.html'.
> 
> Thanks,
> -- 
> Jeff Sheinberg  <jeffsh@erols.com>
> 
> 
> 
> 
> ----- End forwarded message -----
> 
> -- 
> G. Branden Robinson            |    Men use thought only to justify their
> Debian GNU/Linux               |    wrong doings, and speech only to conceal
> branden@deadbeast.net          |    their thoughts.
> http://deadbeast.net/~branden/ |    -- Voltaire



-- 
Thomas E. Dickey <dickey@herndon4.his.com>
http://dickey.his.com
ftp://dickey.his.com

----- End forwarded message -----

-- 
G. Branden Robinson            |    I just wanted to see what it looked like
Debian GNU/Linux               |    in a spotlight.
branden@deadbeast.net          |    -- Jim Morrison
http://deadbeast.net/~branden/ |
[Message part 2 (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 18 09:07:58 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.