Does this site look plain?

This site uses advanced css techniques

The main page associated with this document is here.

The older SCO Open Server 5 (in our case 3.2v5.0.5) is a bit more work to set up, so we've created a separate small page for it. These notes apply to BIND 9.2.1, and we're using GCC 2.7.2.2. We don't think that the SCO C compiler works at all (no "long long" support).

ISC knows about this issue.

Compiling BIND 9

In order to actually build the software on our system, we required a bit of muckery on the command line to make up for a set of lousy system header files:

# CFLAGS='-DFD_SETSIZE=150' ./configure --disable-threads --disable-ipv6

This defines the size of a file-descriptor set (fd_set) used by the select() mechanism, and without this step, two different sizes are unknowing used by BIND source code depending on the order in which system header files are included. This mismatch is very serious and causes all the tools (even those like dig) to simply core dump every time.

Source Code Details

For users who are simply building and installing BIND 9, the details of why the code fails to compile are not that interesting, but this may serve to help those who do study at that level.

The SCO system header file <sys/fdmac.h> defines the size of an fd_set, and the source code in this file

The number of file descriptors in an fd_set is defined by the macro FD_SETSIZE, and <sys/fdmac.h> include the code

<sys/fdmac.h>
/*
 * Select uses bit masks of file descriptors in longs.
 * These macros manipulate such bit fields (the filesystem macros use chars).
 * FD_SETSIZE may be defined by the user, but the default here
 * should be the same as NOFILES_MAX in sys/param.h.
 */
#ifndef FD_SETSIZE
# ifdef NOFILES_MAX
#       define  FD_SETSIZE      NOFILES_MAX
# else
#       define  FD_SETSIZE      150
# endif
#endif

The problem is that NOFILES_MAX here is not the same as that defined in sys/param.h in spite of the proviso in the comment, so two modules that use their #include files in a slightly different way get radically different sizes for the fd_set type.

In the lib/isc/unix/ directory, there are three modules that use the fd_set type, and they don't all agree on the size. This causes the system to core dump when data are passed between them. By defining this (smaller) size on the ./configure line, all the modules agree on the size and the code seem to work.

Installing BIND

The stock SCO nameserver has files scattered all over the filesystem, and in practice we just move a few of them out of the way before we install BIND 9. The /etc/ directory contains a handful of these files (named, named-xfer, dig, and the config files). Typically we create a subdirectory OLD.NAMED and just move the files there to keep them out of the way.

The configuration of the jail is largely as described in the main document, but the two scripts named.start and named.perms may require modification to reflect the different behavior of the chown command. Under Linux and other platforms, the notation is "chown user.group file...", but on SCO the dot is replaced by a colon. This simply needs to be edited by hand.

SCO doesn't provide a /dev/random device, so the message

Jun  6 05:29:17 mycomputer named[831]: no source of entropy found

is expected in the syslogs and can be ignored.

To actually launch the nameserver, we edited /etc/tcp, which is the main shell script. We commented out the old test-and-start code and inserted our own.

        #
        # Name server should start before almost everything
        #

###     if [ -x /etc/named  -a -x /etc/ndc ]; then
###             if [ -f /etc/named.boot -o -f /etc/named.conf ]; then
###                     echo "named\n"
###                     /etc/ndc start
###             fi
###     fi
        echo "named\n"
        sh /chroot/named.start