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]

who and utmp


Ok, turns out that they are coming out with a new version of sh-utils and
it seems to pretty much work except that there may be a possible bug in 
glibc, it doesn't seem to remove old entries from utmp, notice:

rodmur   tty1     Aug 14 16:22
rodmur   ttyp0    Aug 14 16:22
rodmur   ttyp1    Aug 15 09:47
rodmur   ttyp2    Aug 14 16:25


I'm logged into the ttyp2 at this time, w from procps-2.02 appears to handle
this correctly though:

 12:35pm  up 4 days, 22:01,  4 users,  load average: 0.00, 0.01, 0.00
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU  WHAT
rodmur   tty1     -                Sat 4pm 20:12m 12.43s  0.01s  startx         
rodmur   ttyp0    :0.0             Sat 4pm  0.00s  0.94s  0.31s  mutt 
rodmur   ttyp1    :0.0              9:47am  2:36m  0.26s  0.26s  -bash 


So it could be a bug in who or glibc.  

Another thing that surprises me is the way utmp is accessed:

access("/var/run/utmpd.rw", F_OK)       = 0
socket(PF_UNIX, SOCK_STREAM, 0)         = 3
connect(3, {sun_family=AF_UNIX, sun_path="/var/run/utmpd.rw"}, 110) = -1 ECONNRE
FUSED (Connection refused)
close(3)                                = 0
socket(PF_UNIX, SOCK_STREAM, 0)         = 3
connect(3, {sun_family=AF_UNIX, sun_path="/var/run/utmpd.ro"}, 110) = 0

That is from a trace of who (from sh-utils 1.16m), it doesn't have any 
invocation of connect or any other socket types call in the source, it 
in fact tries doing a open on /var/run/utmp.  So I'm guessing that glibc
or utmpd somehow catches the open to /var/run/utmp and then directs it to 
the /var/run/utmpd.* files?  Why?


-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dale Harris  <rodmur@maybe.org>   GPG key: 372FBD57    http://www.maybe.org/
          M.A.Y.B.E. = Maybe is an Altruistic Yet Bohemian Enigma

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