weening@Gang-of-Four.Stanford.EDU (Joe Weening) (05/03/90)
Several people have asked me how to make a working /etc/named, and programs using it, for Concentrix. The following description is, unfortunately, a bit more sketchy than I hoped I could produce, because I didn't document things very well as I did them many months ago. There are probably some mistakes, so please post corrections to this newsgroup. I may not have time to answer personal mail on this subject. What follows should work for Concentrix 5.0 or later. Earlier versions use 4.2 BSD networking code. It is possible to bring up named on Concentrix 4.0 (I did it), but not as easy. Step 1. Get the BSD networking sources code. The place that I got it from is uunet.uu.net, via anonymous ftp, in the directory /bsd-sources/src/network, as a bunch of compressed tar files. It may be available from other places. This code was released from Berkeley later than 4.3 BSD Tahoe. Step 2. The following addition is needed in the "include" directory. *** /public/bsd-sources/network/include/netdb.h Sat Jul 9 14:38:10 1988 --- ./include/netdb.h Mon Oct 30 12:47:49 1989 *************** *** 69,70 **** --- 69,72 ---- + extern int h_errno; + #define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found */ Step 3. Build libutil.a and libresolv.a. The sources for libutil.a are in lib/libutil. The sources for libresolv are in lib/libc/net, using the makefile "Make.resolv". I had to modify these makefiles slightly, adding -I../../../include so that it would use the include files from the new code. Also, I later found several more files that needed to be in the libraries, so I added rcmd.o rexec.o strcasecmp.o to the object files in libresolv.a. Install the libraries where ld will find them, such as in /usr/local/lib. Step 4. Build named. A few changes to the Makefile were needed: CFLAGS= -O ${DEFINES} -I../include RES= -lresolv Install named and its configuration files. You'll have to read the documentation for this. Step 5. Build programs using the resolver library. The programs I've compiled so far are: ftpd, rlogind, rshd, telnetd, finger, ftp, rlogin, rsh, telnet. Also sendmail, though it requires a bit of extra work. In most cases, all that is needed is to add -I../include and -lresolv to the appropriate places in the Makefile and compile. For ftpd, I had to change the function named "popen" to "ftpd_popen" and "pclose" to "ftpd_pclose" in popen.c. That should do it! -- Joe Weening Computer Science Dept. weening@Gang-of-Four.Stanford.EDU Stanford University