utmp and finger (WAS: Re: some fixes.... Re: connections.tdb & messages.tdb getting full of junk)

Andrew Bartlett abartlet at pcug.org.au
Mon Jan 8 23:17:07 GMT 2001


Toomas Soome wrote:
> 
> regarding to junk... there is second posting of some of my work. there
> are some issues fixed - look into diff's attached.
> 
> one problem was wrong usage of pointer, while reading session id from
> tdb:
> 
> diff -r1.20.4.3 connection.c
> 341c341
> <       slotnum = (int) dbuf.dptr;    ## this is POINTER, you cant juse
> it like that!
> ---
> >       slotnum = *((int*)dbuf.dptr);  ### this is correct way to do
> 
> my letter from december follows:
> 

--snip quota stuff--

> utmp related fixes:
> 1. utmp session fails to be closed in utmp_yield(). problem is actually
> in utmp_yield_tdb, connection numbed will be saved into utmp.tdb, but
> utmp_yield_tdb will return pointer to this number, not the number
> itself.
> 2. "smb/session_id" in ut_line will confuse finger and other tools (at
> least in solaris). the fix is to create dummy /dev/smb/session_id files
> - symlinks to /dev/null. current code assumes existing /dev/smb
> directory for smb/%d type records, its easy to add call to mkdir() as
> well. I left it out because I'm not sure about group for this
> directory.... I guess, need for /dev/smb directory should be documented
> in smb.conf manpage as well....

Does ftp (presuming it uses utmp logging) confuse finger in the same
way?  As this appears to be the standard on these issues 'what do other
programs do?'. Adding directories to /dev/ seems a bit extreme.

Currently the thing that confuses my (linux, RH6.2) finger is the fact
that users are not logged in the 'last logons' file, and the 'idle for'
times have always been bogus (not even time logged on).  Adding a
/dev/smb changes the output from 'w' and 'finger' but the results are
still just as meaningless.

> 
> context diffs are against SAMBA_2_2 cvs sources.
> 
> toomas
> --
> Life is both difficult and time consuming.
> 

-- 
Andrew Bartlett
abartlet at pcug.org.au

-- 
Andrew Bartlett
abartlet at pcug.org.au




More information about the samba-technical mailing list