Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jan 1996 16:22:36 +0100 (MET)
From:      Åge Røbekk <aagero@aage.aage.priv.no>
To:        joerg_wunsch@uriah.heep.sax.de
Cc:        team_fbf@pristine.com.tw, wosch@cs.tu-berlin.de, freebsd-bugs@freebsd.org
Subject:   Re: getlogin() returns bogus username
Message-ID:  <199601171522.QAA03700@birk04.studby.uio.no>
In-Reply-To: <199601170837.JAA02294@uriah.heep.sax.de> (message from J Wunsch on Wed, 17 Jan 1996 09:37:44 %2B0100 (MET))

next in thread | previous in thread | raw e-mail | index | archive | help
| As ywliu wrote:
| > 
| > Just a wild guess : can it be the '-' in per-stia confusing the program ?
| > Probably the suggested username should consist of numbers and alphabets.
| 
| Nope, there used to be a bug with getlogin().  We all remember the
| various CVS commit message from Peter Wemm, where `sean' (i think)
| appeared as the name of the commiter.
| 
| Lemme think... the problem happened whenever somebody was logged in
| via telnet.  The getlogin() name was once per session, and the entire
| inetd(8) uses a single session.  telnetd doesn't change the session.
| 
| I remember that Peter has been fixing the problem.

To reproduce the problem with getlogin(), I started xdm and logged in
as myself. Then i started Xnest from another xterm with a XDMCP query
to localhost, and logged in as another user. Before I logged in as the
other user, getlogin returned my userid from any new xterm I
started. After this other user have logged in with xdm, getlogin
returns this other userid when I call the function from any new
xterm. It seems like xdm calls setlogin, but how can that affect my
already started session? I assume my window manager is the PPID of the
xterms, and the window manager was started by
/usr/X11/lib/X11/xdm/Xsession:

xdm -> Xsession -> wm -> xterm -> shell -> getlogin

I am running the latest xdm with the security fix from X consortium,
from XFree 3.1.2B.

-aage



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199601171522.QAA03700>