More utmp stuff

Steve Langasek vorlon at
Fri Mar 24 21:23:22 GMT 2000

On Sat, 25 Mar 2000, David Lee wrote:

> o  The sheer variety of utmp implementations means that porting is
>    becoming increasingly non-trivial.

> o  We should strongly consider moving the code out of "smbd/connection.c"
>    into a separate file, because the code will, of necessity, become
>    increasingly littered with "#ifdef MY-LITTLE-OS" constructions
>    (somewhat akin to "smbd/quotas.c").

Regardless of whether you break the utmp code out into a separate file, it
seems to me that this is a good place to apply the autoconf principle of "test
for features, not for platforms".  Although each utmp implementation has its
quirks, I imagine there are relatively few points on which they actually

Also, determining the location of the utmp file can probably be done cleaner
in a header file or in autoconf.  glibc defines the path in <utmp.h>
(<utmpx.h>) to be _PATH_UTMP (_PATH_UTMPX).  Other OSes surly define something
similar--or is the problem that there are OSes whose header definitions don't
match the real path?

Steve Langasek
postmodern programmer

More information about the samba-technical mailing list