This is the mail archive of the glibc-linux@ricardo.ecn.wfu.edu mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: who and utmp


>>>>> Dale Harris writes:

Dale> On Mon, Aug 16, 1999 at 07:18:34AM +0200, Andreas Jaeger elucidated:
>> That would be a problem with xterm/login etc not calling the correct
>> cleanup functions.

Dale> Ok. Course it is interesting that 'w' is smarter than 'who'.


>> That's the result from calling getutent.  Read the glibc doku about utmpd.
>> 

Dale> Well, that's the point, they don't use the getutent() functions.  They just
They use setutent - see glibc-2.1.1/login/README.utmpd

Dale> do fopen("/var/run/utmp", "r") or similar.  I read the doc, but wierder 
See sh-utils-2.0/lib/readutmp* for the implementation that's used in
who.

Dale> stuff is going on.  It would appear that it isn't necessary to use 
Dale> getutent().  Is there any chance utmpd somehow redirects an open on 
Dale> /var/run/utmp?  Cause it still looks like that is what is going on.
Nope, utmpd isn't that intelligent.

Andreas
-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]