[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#466104: xinit: please use sessreg like in xdm, to log startx in the wtmp database



reassign 466104 x11-common
thanks

On Sun, 17 Feb 2008, Julien Cristau wrote:

> severity 466104 wishlist
> kthxbye
>
> On Sun, Feb 17, 2008 at 02:51:53 +1100, Tim Connors wrote:
>
> > For those of us who choose not to start X every boot using xdm, we
> > don't get the X session being logged in the wtmp database like it does
> > from xdm.
> >
> > Because X can be started and the parent shell subsequently exited, the
> > lack of an entry in wtmp gives the sysadmin a false impression that
> > noone is actually logged into the system when it comes time for them
> > to do maintenance and rebooting.
> >
> > xdm has its mechanism in /etc/X11/xdm/{Xstartup,Xreset} to log the
> > details using sessreg - it would be good if startx could make use of a
> > similar scheme too.
> >
> xdm runs as root, and actually lets the user log in.  Neither of those
> is the case for xinit.  The user running xinit has already logged in.
> (I'm actually tempted to close this bug or at least tag it wontfix)

Except that the user is free to logout of the terminal which started X, so
it truly is a seperate login.

With xdm, w shows the TTY as :0 (or :1 or xdmcphost:0 or whatever), and
with startx, it should also show the display being used (since individual
xterms within that X session won't log their logins/logouts).

xinit doesn't run as root, but X certainly does.  It knows the real uid of
the user running X, it knows the time it is running for, and it knows the
display, and thus it has all the info it needs to log an entry in the wtmp
database.  It might need/want to check that an entry hasn't already been
logged by sessreg on behalf of xdm, which may or may not be part of the
same X session because of xdmcp remote displays.

Perhaps I need to reassign this bug from xinit to x11-common since it owns
the X binary.

-- 
TimC
"Think of bicycles as rideable art that can just about save the
world." - Grant Peterson



Reply to: