The OS/2 port of bind 4.9.3

Peter Meerwald

8. August 1996

1 What is it?

This is release 4.9.3 of bind^{1} ported to OS/2. It relies on EMX^{2} 0.9b fix 5 (or newer).

2 Installation

To install just take a look a the standard bind documentation^{3}. The directory structure for the OS/2 port is laid down in named/pathnames.h. See section ’Directory layout’ for further information and means to fit your personal setup without recompiling. The EMX runtime and IBM TCP/IP have to be installed. HPFS is required.

You will find the executables in the source directories (named/, tools/, tools/nslookup), make install does (of course) not work (yet).

It is a good idea to have syslogd running the first time you start named. Try parameter -d for extensive debug info and/or -q for query logging. Default log level is 1; a log level of -d 20 produces over 60 kb of output during the first 2 seconds – beware…

3 OS/2 specific stuff

3.1 What happened to the code?

Actual code is pretty unchanged, I adapted the makefiles, figured out a suitable compat/lib/lib44bsd.a, read conf/protability.h very carefully :) and while doing so my OS/2 box turned into a unix-lookalike^{4}.

Look for EMX defines in the code (you won’t find many) to see what changed.

Upon request (I was really forced to do so:) I made the path-setup somewhat more dynamic for OS/2 – now the code evaluates the environment variables ETC, TMP and TEMP and adapts accordingly. Two (hopefully) new environment were introduced:

• NAMED XFER – points to the named-xfer program (otherwise the default /tcpip/bin/named-xfer is used)

• NAMED BOOT – points to the named boot file (otherwise named looks for TMP/namedb/named.boot)

• NSLOOKUP HELP – points to the nslookup helpfile (nslookup assumes to find its helpfile as /tcpip/help/nslookup.help)

1Berkley Internet Name Domain

2Eberhard Mattes eXtentions – a distribution of GCC for OS/2

3look at http://www.vix.com/isc/bind.html for a reference manual (BOG – Bind Operations Guide), FAQ, protocol definitions, …

4you may wish to get GNU shell—file—text utilities from hobbes

Beware! The nice() and renice() code has been replaced with dummy code, so the OS/2 port may consume more CPU time than neccessary.

3.2 Re-compiling

Especially named/Makefile contains one bad hardcoded hack (I was unable get sed to work), I used tcsh 6.0.6.1 and bash 1.12, to me, it seems that these shells lack some features :) - well I’m very lost when it comes to shell setup/shell features - I am awaiting your hints…

News flash: Try ksh 5.27 to re-compile – works much better that tcsh and bash! Compiles the entier project in one pass, wow…

In order to re-compile the bind port you’ll need a syslog library (on hobbes^{5} for IBM’s CSet, a port of the port to EMX is available from the author) and flex 2.4.5.

/emx/include/sys/time.h was extended to include stuff we need for setitimer(). Maybe we will see this in one of the next EMX distributions… [bad hack :)]

I removed the contrib/, shres/, doc/rfc/ directory from the original distribution, some postscript files about DNS security were also removed.

3.3 Sending signals

Unix background daemons receive commands via signals that are sent to their pid^{6}. bind 4.9.3 understands a number of signals: SIGINT, SIGQUIT, SIGIOT, SIGUSR1, SIGUSR2, SIGHUP, SIGALARM, SIGTERM.

A way to send signals under OS/2 is provided in the Apache httpd port^{7} in directory Apache/os2/.

4 History of the OS/2 port

• June 14, 1996 — released bind493a.zip, initial release

• July 1, 1996 — bind493b.zip contains this wonderful L^{A}TEX -README and, more important, a fix for the ”core dump” bug when set up as a secondary name server (well, now everything is linked static); some cleanups were done to the Makefiles; this is just an update release, it contains only executables and this README!

• July 3, 1996 — released bind493c.zip to fix a bug which occurred when transferring a zone; it contains only named.exe and an updated README.

/* kernels that map pages for IO end up failing if the pipe is full at exit and we take away the final buffer. this is really a kernel bug but it’s harmless on systems that are not broken, so... */

• August 2, 1996 — rename() does not overwrite the target under OS/2, implemented an awkward work-around (see compat/lib/rename unixstyle.c).

• August 3, 1996 — started to make the bind stuff more dynamic – looking for environment variables ETC and TMP or TEMP first…

• August 8, 1996 — nsloopup.help is now searched in the path specified by the HELP environment variable; the following optional environment variables are supported now: NAMED XFER may point to the named-xfer program, NAMED BOOT locates the named.boot file and NSLOOKUP HELP may point to the nslookup.help file

5point your browser to ftp://ftp-os2.nmsu.edu/os2 or ftp://ftp-os2.cdrom.com

6a unique number identifying a process

7again on hobbes or http://www.apache.org/

5 Directory layout of the OS/2 port

You will have less troubles if you use the directory layout given below! However, you can fit the OS/2 bind directory layout to your needs by setting the environment variables gives in brackets.

/tcpip/bin/ named.exe (or somewhere in your PATH) named-xfer.exe (NAMED XFER) nslookup.exe (or somewhere in your PATH) dig.exe (or somewhere in your PATH) dnsquery.exe (or somewhere in your PATH) host.exe (or somewhere in your PATH) /tcpip/help/ nslookup.help (NAMED HELP) /tcpip/etc/ (ETC) named.pid /tcpip/etc/namedb/ (ETC) named.boot (NAMED BOOT) (and your configuration files) (use ’directory’ keyword in your named.boot) /tmp/ (TMP or (TEMP) named.run named dump.db named.stats xfer.trace xfer.ddt.XXXXXX

Example:

• You are using MPTS (not LAPS, TCP/IP 2.0), so your ETC environment variable will likely point to x:/mptn/etc – your named.boot file should be located in x:/mptn/etc/namedb.

• Using MPTS want to have your bind executables in x:/mptn/bin – set NAMED XFER to x:/mptn/bin, set NSLOOKUP HELP to x:/mptn/help (and copy nslookup.help to x:/mptn/help of course).

• You absolutely want the named configuration files on c:/named – so set NAMED BOOT to c:/named.

Warning: The OS/2 bind port has not been excessively tested in a multipledrive configuration (say ETC = g:/mptn/etc, TMP = d:/tmp, NAMED BOOT = c:/namedb, …).

6 To do

• either replace makefiles with REXX scripts or craft’em right

• include a working sample configuration

• find and fix bugs in the port :)

• make named display some debug info in its window

• provide some means to send signals to named

• figure out a way to have dynamic linking and a working fork()

• a solid distribution archive

• get the OS/2 port into the standard bind distribution? is it worth the struggle?

7 Acknowledgements

Many thanks to

Eberhard Mattes mattes@azu.informatik.uni-stuttgart.de for EMX which this port heavily relies on

Christof ’Mirus’ Meerwald for his punny Linux box operating as the secondary in-house domain

Nicolai Langfeldt janl@math.uio.no for his ”HOWTO become a totally small time DNS admin”^{8}

jack@kf5mg.cybermail.net for his efforts recompiling the code and his detailed bug reports

Wieslaw Pawlowski wiesiek@ipipan.gda.pl for his detailed bug reports

Andrew J Hood ajhood@fl.net.au for his useful patches

Mike Burgett burgett@cmnsens.zoom.com who was wondering how difficult it would be to get the contents of the ETC environment setting…

Christoph Lechleitner lech@lech.priv.at for his help in general

… and some other people those contributions were dumped by my brain-dead NeXT-mailer at university.

8 How to contact the author

I’m very interested in your comments and flames… Still, if everything is running fine please tell me the domain you are serving with this bind port, just for my ego :)

Peter Meerwald pmeerw@cosy.sbg.ac.at Schiestandstr. 3 Peter.Meerwald@2-315-11-0.st.co.at A-5061 Elsbethen/AUSTRIA 2:315/11@fidonet.org

BTW: Are you interested in an sendmail port for OS/2? Is there already a port? Please let me know…

9 Disclaimer

Beware: I am no DNS specialist. There may be serious bugs or security holes in the OS/2 port of bind 4.9.3 – use at your own risk! Insert your favourite disclaimer text below…

8online at http://www.lh.umu.se/b̃jorn/linux/howto/DNS-HOWTO.html for example