poking/prodding utmp
Freddie
freddie at ns1.nowait.net
Wed Apr 5 03:32:14 GMT 2000
Hmm.
Funny, I just get things working on 2.0.7pre2, and pre3 comes out... *sigh*
:) Haven't had a chance to download it yet (read: Nox is too damn
addictive), but I'll eventually get around to it.
Progress...
utmp consolidation: it's working! It even gets it's own smb.conf option,
huzzah. Ok, next question...
Normally, with utmp support enabled, it sets the user's "line" to
"smb/<connid>". What's wrong with that? Well, you end up with something
like this: (or something close to it)
freddie smb/1 zugzug Tue 2am 0.00s 13days ? -
freddie smb/8 bouncy 6:20am 0.00s 13days ? -
lewi smb/11 narf Sun 5pm 0.00s 13days ? -
It varies depending on the number of shares the client machine is
accessing. I shudder to think what you'd end up with when a hundred or so
people connect.... so I wrote another patch... and now I get:
freddie smb/2 zugzug Tue 2am 0.00s 13days ? -
freddie smb/3 bouncy 6:20am 0.00s 13days ? -
lewi smb/4 narf Sun 5pm 0.00s 13days ? -
(smb/1 is broken from me messing with it before, and I can't work out how
to clear out the rotten utmp entry, heh).
[2000/04/04 02:37:35, 1] smbd/connection.c:utmp_line(375)
utmp_line: nope, smb/1 is already used
[2000/04/04 02:37:35, 1] smbd/connection.c:utmp_line(360)
utmp_line: checking smb/2
[2000/04/04 02:37:35, 1] smbd/connection.c:utmp_line(370)
utmp_line: yay, we can use smb/2
Not sure if the DEBUG level should be moved up/down/whatever, 1 is just
convenient for me so I don't get a whole lot of other stuff :)
This involved adding another function, static int utmp_line(void), which
returns an int (obviously), which is the next smb/<n> that we can use. Tada.
The question is, should this be a seperate option, part of utmp
consolidate, or just always on? I'd vote for having it always on (well, if
utmp = Yes).
Freddie
More information about the samba-technical
mailing list