More utmp stuff

Steve Langasek vorlon at
Mon Mar 27 16:02:21 GMT 2000

On Mon, 27 Mar 2000, David Lee wrote:

> o  I had originally sketched it with "connection.c" for self-containment
>    and ease of debugging, but agree that autoconf/ is
>    probably the most appropriate place in general.

> o  My traditional understanding was that caution should be exercised in
>    using #defines with a leading "_", and that the publicly-used variables
>    did not have a leading "_".

glibc also does


in the header file.  It seems that the _PATH_UTMP variable is /preferred/
under glibc, but both are usable.  I think all that really needs to be done is
to put together a list of available names for the macro and sort them in order
of preference (if there's even any need for sorting).

Perhaps an autoconf check:

[  --with-utmpfile=file  Use alternate utmp file <file>
  --without-utmpfile    Don't include utmp support],
[ case "$withval" in
  # Just in case anybody does it
    AC_MSG_WARN([--with-utmpfile called without argument - will use default])
  * )
  [ <do something else here to turn off utmp support> ]

A line in

/* Define to specify an alternate (default) path to the system utmp file.  */

... and then a check in one of the other header files:

#ifdef UTMP_FILE

And repeat for wtmp.  Is there a need for checking utmp v. utmpx at this
point?  I think that would only come into play when checking for features.

Steve Langasek
postmodern programmer

More information about the samba-technical mailing list