[TUHS] Linux is on-topic

Alexander Voropay alec at sensi.org
Sat Jul 18 07:56:59 AEST 2020


IMMSMC the early Linux had problems with some old-good programs i.e. Sendmail.
New-born Linux hesitated between POSIX-BSD-Solaris semantic
i.e. in file-locking, pty, network interface binding e.t.c.


>From the early Sendmail README:
===

Linux
Something broke between versions 0.99.13 and 0.99.14 of Linux:
the flock() system call gives errors.  If you are running .14,
you must not use flock.  You can do this with -DHASFLOCK=0.

Around the inclusion of bind-4.9.3 & linux libc-4.6.20, the
initialization of the _res structure changed.  If /etc/hosts.conf
was configured as "hosts, bind" the resolver code could return
"Name server failure" errors.  This is supposedly fixed in
later versions of libc (>= 4.6.29?), and later versions of
sendmail (> 8.6.10) try to work around the problem.

Some older versions (< 4.6.20?) of the libc/include files conflict
with sendmail's version of cdefs.h.  Deleting sendmail's version
on those systems should be non-harmful, and new versions don't care.

Sendmail assumes that libc has snprintf, which has been true since
libc 4.7.0.  If you are running an older version, you will need to
use -DHASSNPRINTF=0 in the Makefile.  If may be able to use -lbsd
(which includes snprintf) instead of turning this off on versions
of libc between 4.4.4 and 4.7.0 (snprintf improves security, so
you want to use this if at all possible).

NOTE ON LINUX & BIND:  By default, the Makefiles for linux include
header files in /usr/local/include and libraries in /usr/local/lib.
If you've installed BIND on your system, the header files typically
end up in the search path and you need to add "-lresolv" to the
LIBS line in your Makefile.  Really old versions may need to include
"-l44bsd" as well (particularly if the link phase complains about
missing strcasecmp, strncasecmp or strpbrk).  Complaints about an
undefined reference to `__dn_skipname' in domain.o are a sure sign
that you need to add -lresolv to LIBS.  Newer versions of linux
are basically threaded BIND, so you may or may not see complaints
if you accidentally mix BIND headers/libraries with virginal libc.
If you have BIND headers in /usr/local/include (resolv.h, etc)
you *should* be adding -lresolv to LIBS.  Data structures may change
and you'd be asking for a core dump.


More information about the TUHS mailing list