BUG? utmp returning incorrect 'i' in 2.2

Andrew Bartlett abartlet at pcug.org.au
Fri Feb 16 11:17:05 GMT 2001


I have been hacking samba to include better PAM support, including
session support, and have been paying rather too much attention to some
of the debug output.  However one of the things seems to be 'just wrong'
and it appears to be in the original code. 

In samba 2.2 utmp 'devices' are derived from records in a tdb, with the
lowest claimed record used as the device (in the form smb/i).  However
on the closing of a connection the value returned from utmp_yield_tdb is
never the same as the original 'i' (0 in most cases), usually
135888504.  Running with 'utmp consolidate'  (a very nice feature) masks
this behavior, but without it the bug shows up in 'last' as 'user still
logged in' despite them dissapering from 'w'.  The record is
successfully deleted from the tdb, and that connection is reused (ie
i=0) for future connections, therefore ending the 'connection' in wtmp. 

Is this a live one?  

My machine is RedHat 7.0 + Rawhide, and uses the dreaded (and
misunderstood) gcc 2.96-69 (the one from their errata).  I am using a
current CVS snapshot of samba, with some of my own patches (which
shouldn't affect this issue).

Thanks,
Andrew Bartlett
-- 
Andrew Bartlett
abartlet at pcug.org.au




More information about the samba-technical mailing list