SUMMARY: DNS

From: Terry White (tkw@blazer.babss.basg.com)
Date: Fri May 28 1993 - 03:54:55 CDT


Hello all, I finally got the fix for the DNS problem. Below is a copy of my
original request. I failed to metion in the problem that I wasn't running
NIS. Apparently Sun does not support systems running DNS without NIS. You
need a file libc.so.1.8.1 in /usr/shlib.etc to make DNS resolve names. I
was able to get the fix from Sun, it's included in this message. Thanks to
everyone who responded.

Craig Mcguinness <cmcgines@is.rpslmc.edu>
cxh@arsenic.berkeley.edu
eckhard@ts.go.dlr.de (Eckhard Rueggeberg)
cxh@arsenic.berkeley.edu
Matt_Mauss_-T@hqdev.3mail.3com.com
canuck@rice.edu (Mike Pearlman)
hand@cc.bellcore.com (hand,james c)

> Hello folks, I am having problems setting up name resolution on my system.
> First my system is sparc10 running 4.1.3. My system is a sub domain of
> basg.com. My domain is babss.basg.com. Nslookup works fine, the problem
> is if I try to ftp, telnet or ping just using the name of the system. The
> error that I get is host unknown. The system will not resolve names outside
> the babss.basg.com domain. I am stumped. One of my problems is I'm a rookie
> on the whole concept of DNS. Any information will be greatly appreciated.

Below is the Patch:

SRDB ID : 2170

SYNOPSIS : Using DNS without NIS

DETAIL DESCRIPTION : Want to use DNS, but not NIS

SOLUTION SUMMARY : MAKING A LIBC.SO for DNS without NIS

                     This is a procedure that can be used to add name resolver
                     routines into shared libc library in SunOS_4.1.x

                     First load "SHLIB CUSTOM" either from SunInstall or from
                     add_services.

                     Be sure to have the file /etc/resolv.conf configured
                     properly. Test this with /usr/etc/nslookup.

1. Become super user:

        % su (if necessary)

2. Make a temporary directory:

        % cd /usr/lib/shlib.etc
        % mkdir tmp

3. Change to the "tmp" directory just made, extract the pic .o from
   libc_pic.a and rm the file __.SYMDEF. The reason you need to do
   the 2 "mv" commands is because "ar" truncated filenames over
   16 characters.

        % cd tmp
        % ar x ../libc_pic.a
        % rm __.SYMDEF
        % mv rpc_dtablesize. rpc_dtablesize.o
        % mv rpc_commondata. rpc_commondata.o
        % ar x /usr/lib/libresolv.a

    The libresolv.a (apparently) contains object modules position independant,
    so they can be added to the libc_pic modules without fear.

4. Remove the old routine to do the hostname/addr resolution:

        % rm gethostent.o

5. Remove the libresolv module that contains `strncasecmp' (which is now
   in the main C library, so it is redundant):

        % rm strcasecmp.o

6. % cd ..

7. Copy lorder-sparc to lorder-sparc.orig. Edit the file lorder-sparc and
    remove the reference to `gethostent.o' and add the references to the
    resolver library routines by applying this patch:

        remove : gethostent.o

           add : gethostnamadr.o
                        sethostent.o
                        res_query.o
                        res_mkquery.o
                        res_send.o
                        res_debug.o
                        res_comp.o
                        res_init.o

        % diff -rc2 lorder-sparc.orig lorder-sparc
        *** lorder-sparc.orig Thu Feb 8 05:27:46 1990
        --- lorder-sparc Mon Apr 9 12:58:59 1990
        ***************
        *** 150,154 ****
          getwd.o
          getnetgrent.o
        ! gethostent.o
          ypxdr.o
          ttyname.o
        --- 150,161 ----
          getwd.o
          getnetgrent.o
        ! gethostnamadr.o
        ! sethostent.o
        ! res_query.o
        ! res_mkquery.o
        ! res_send.o
        ! res_debug.o
        ! res_comp.o
        ! res_init.o
          ypxdr.o
          ttyname.o

8. % make libc.so

9. Now some libc.so.x.y.z built in the current directory. It is recommended
   that you test out this library at this point before installing it. Can do
   so by setting the environment LD_LIBRARY_PATH to the current directory, for
   example:

   This step did not work. Proceede with copying libc.so.1.8.1 to usr/lib
   and do the ldconfig.

        % setenv LD_LIBRARY_PATH `pwd`
        % your_favorite_test_cmd (ie. ping, ftp, telnet)

   Once satisfied that the new library worked, proceed to install it with the
   following commands:

        % cp libc.so.x.y.z /usr/lib
        % ldconfig
        % unsetenv LD_LIBRARY_PATH

10. Now running with the new library. Verify this by doing a trace command
    of let's say "date".

        % trace date

   The output should inform you that the new library is being used.

SYMPTOMS : Can resolve addresses with nslookup, but can't ping,
                     telnet, or ftp to system by name.
 
KEYWORDS : shared library libc.so resolver nameserver

PRODUCT : DNS

----- End Included Message -----

+---------------------+--------------------------------+
| | Bell Atlantic Business Systems |
| | 50 East Swedesford Road |
| Terry White | Frazer, PA 19355 |
| | Phone: (215) 296-2940 |
| | Fax: (215) 296-6247 |
| | Email: tkw@blazer.bell-Atl.COM |
+---------------------+--------------------------------+



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:07:53 CDT