Release of 2.0.7 due soon.

David Lee T.D.Lee at durham.ac.uk
Fri Apr 7 14:38:58 GMT 2000


On Fri, 7 Apr 2000, Steve Langasek wrote:

> On Fri, 7 Apr 2000, David Lee wrote:
> 
> > [...]
> > (The remaining minor problem is automatic detection of these default
> > locations.  The compile-time stuff tries to do this, often successfully. 
> > But for some reason it cannot determine them on Redhat 6.1 (and perhaps
> > other Linuxes?), and I don't yet have access to such a system to try to
> > chase it myself.)
> 
> My glibc header files (RedHat 6.1, mostly) show WTMP_FILE pointing to
> "/var/log/wtmp", so it should be picking this up properly.  If no one figures
> it out before then, I'll take a look at this next week and find out why it's
> not picking this up.

Thanks.  But it seems a little more subtle.

An overall assumption I have made is to prefer the -x variety if the
system offers both.  I think this is a fair assumption, from the evolution
of mainstream UNIX systems.  Is there any contrary evidence to this trend?

On Redhat 6.1, "configure" seems to find the preferred "utmpx.h" header
file so proceeds on that basis.   But then it comes unstuck...

Contrast RH's -x and non-x files.  The non-x files simply define WTMP_FILE
etc.  But the -x files have the WTMPX_FILE declarations guarded by "#ifdef
__USE_GNU".  My guess is that this is a non-default way of working (and
I greatly believe in using defaults where reasonably possible).  Therefore:
o  those "X" variables do not get defined;
o  I'm cautious about rushing cavalierly in to arrange their definition. 

By contrast, the older, non-x files seem not to have this complication:
my guess is that WTMP_FILE (etc.) would be properly defined.

Possible workarounds:

o  If configure finds the newer, preferred, x-files, but the code ends up
   with a unset default path, then let it look for a non-x default, and 
   then use non-x routines (i.e. as if configure had not found x-files).

o  If configure finds the newer, preferred, x-files, it does test 
   compilations to see whether "UTMPX_FILE" etc. are defined; if not
   then it adjusts its own #defines so that the code uses the non-x
   options.

o  Arrange for Redhat (and other Linux?) to get "_USE_GNU" defined.  But
   what side-effects might ensue?

Before dropping back to non-x working, however, note:
(a) is this retrograde in the longer term, grand scheme?
(b) I never found a way to be able to update wtmp cumulatively (see 
    comments in code).

This all needs to be weighed and assessed carefully, by people who know
the various flavours of Linux (and I certainly don't).

My suggestion is that for the immediate 2.0.7 release, we adopt the patch
(level ".2"), adjusting its smb.conf(5) text to urge caution with the
"utmp" features in general, and perhaps indicating for Redhat users (other
Linux?) that they'll need explicit "utmp dir" and "wtmp dir" entries. 

Thanks again for your interest.

-- 

:  David Lee                                I.T. Service          :
:  Systems Programmer                       Computer Centre       :
:                                           University of Durham  :
:  http://www.dur.ac.uk/~dcl0tdl            South Road            :
:                                           Durham                :
:  Phone: +44 191 374 2882                  U.K.                  :



More information about the samba-technical mailing list