Samba 2.0.7 : utmp patch

David Lee T.D.Lee at durham.ac.uk
Sat Apr 29 18:10:08 GMT 2000


New to Samba 2.0.7 is a "--with-utmp" option, and some associated
parameters in smb.conf.  If this aspect is of no interest, hit "delete"
now...

During the development of the umtp support, it became clear that there was
a very wide variety of utmp implementations on various operating systems.
By the time 2.0.7 shipped, the utmp code was in reasonable shape for some
operating systems, but was far from adequate for others. 

I have developed a patch for 2.0.7 which should address most of the known
issues.  In particular:
o  it should compile on all systems for which folk earlier tested it;
o  it stands a better chance of compiling on systems not yet tested;
o  it should function well on tested and untested systems (but see below);
o  it should find the system's default files, including for utmp and wtmp
   being in different directories;
o  the "utmp consolidate" idea should now work much better.

The functionality currently _requires_ the OS to have a programmatic
interface to the utmp/wtmp family of files.  This should be automatically
detected.  (Being able to use non-programmatic interfaces would be a major
exercise, and probably only of benefit to old OSes, such as SunOS 4.x . 
So I have no plans to write it, although your contributed version would be
considered.) 

For wtmp{,x} support, it _requires_ the "updwtmp{,x}()" routine, similarly
automatically detected.  I suspect HP-UX 10.x might suffer here.  If such
functionality is required, could an enthusiast write, test and contribute
the necessary code, please?  (Be warned: when I tried this on Solaris,
bypassing its updwtmpx(), I couldn't get it to work.  Of course, this
might be my fault, not Solaris's, but...) 

The patch is just under 100k in size.  The size is 78% due to the derived
"configure" script, included for the benefit of those without access to
"autoconf" and "autoheader".  It comprises patches to the files: 
   configure.in
   accconfig.h
   configure
   include/config.h.in
   smbd/connection.c
and is available at:

   http://www.dur.ac.uk/~samba/utmp-207.patch

Because of the quantity of "#if defined(...)" constructions, there may
well be lurking faults. 

Could the utmp enthusiasts test it, please?  Report any faults to me,
preferably accompanied by the appropriate correction/patch.

Again let me express my gratitude to those who have helped test and
develop the functionality.  Any remaining faults in the code are, of
course, mine, not theirs. 

-- 

:  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