home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1996 May / PCOnline_05_1996.bin / linux / source / n / bind / bind-4.001 / bind-4~ / bind-4.9.3-BETA9 / conf / Info.Ultrix < prev    next >
Text File  |  1993-12-15  |  4KB  |  109 lines

  1. -------- Message 1 of 2
  2.  
  3. Return-Path: bind-workers-request
  4. Received: by gw.home.vix.com id AA15469; Wed, 15 Dec 93 06:29:03 -0800
  5. Received: by gw.home.vix.com id AA15463; Wed, 15 Dec 93 06:29:00 -0800
  6. Received: from monkeyboy.WPI.EDU (gshapiro@monkeyboy.WPI.EDU [130.215.24.62]) by bigboote.WPI.EDU (8.6.5.Beta3/8.6) with ESMTP id JAA09389; Wed, 15 Dec 1993 09:28:50 -0500
  7. Date: Wed, 15 Dec 93 09:08:10 +0000 (GMT)
  8. From: "Nigel Metheringham" <nigelm@ohm.york.ac.uk>
  9. To: Gregory Neil Shapiro <gshapiro@WPI.EDU>
  10. Subject: Re: sendmail 8 and name resolution 
  11. Cc: Paul A Vixie <paul@vix.com>, bind-workers@vix.com, aej@WPI.EDU
  12.  
  13. } [on compilation of things linked with bind 4.9.2 libresolv]
  14. } I tried to do this but ran into problems.  When compiling sendmail
  15. } using libresolv.a from the BIND 4.9.2, the compilation fails since
  16. } things are multiply defined:
  17.  
  18. } [compilation]
  19. } ld:
  20. } /lib/libc.a(gethostent.o): sethostent: multiply defined
  21. } /lib/libc.a(gethostent.o): endhostent: multiply defined
  22. } /lib/libc.a(gethostent.o): gethostbyname: multiply defined
  23. } /lib/libc.a(gethostent.o): gethostbyaddr: multiply defined
  24. } *** Error code 1
  25.  
  26.  
  27. This must be a bug in the MIPs compiler set - we see very much the  
  28. same problem on a MIPs system running 4.52.  I put in a bug report  
  29. about this a couple of years back (slightly different version of the  
  30. OS, but same symptoms).  Its relatively complex in that you cannot  
  31. reproduce it in a small file (well I can't!).
  32.  
  33. My hack to get round it was to make a new libresolv.a (actually for  
  34. me its libresolv2.a) with the following defines on the cc command  
  35. line
  36.     -Dgethostbyname=Gethostbyname
  37.     -Dgethostbyaddr=Gethostbyaddr
  38. and compile sendmail (or other package with same problems) with the  
  39. same defines.  Its messy but it works.
  40.  
  41. [To complicate matters some programs of similar complexity and  
  42. network functionality to sendmail do suffer from this problem when  
  43. compiling, and some don't!]
  44.  
  45.     Nigel.
  46. ---
  47. #   Nigel Metheringham  -- (NeXT) EMail: nigelm@ohm.york.ac.uk    #
  48. #   System Administrator, Electronics Dept, University of York    #
  49. #   York YO1 5DD. Phone: +44 904 432374, Fax: +44 904 432335      #
  50.  
  51. -------- Message 2 of 2
  52.  
  53. From: Gregory Neil Shapiro <gshapiro@WPI.EDU>
  54. Received: from localhost (gshapiro@localhost) by monkeyboy.WPI.EDU (8.6.5.Beta3/8.6) id JAA05398; Wed, 15 Dec 1993 09:28:49 -0500
  55. Date: Wed, 15 Dec 1993 09:28:49 -0500
  56. Message-Id: <199312151428.JAA05398@monkeyboy.WPI.EDU>
  57. To: Paul A Vixie <paul@vix.com>
  58. Cc: aej@WPI.EDU, bind-workers@vix.com
  59. Subject: Re: sendmail 8 and name resolution 
  60. In-Reply-To: <m0p9sDK-000E9cC@rioja.ohm.york.ac.uk>
  61. References: <m0p9sDK-000E9cC@rioja.ohm.york.ac.uk>
  62.  
  63. We think we have figured out what local_hostname_length does by trying it
  64. with different inputs.  We can't be sure this is its only purpose.  It
  65. seems to return the length of a local (in domain) hostname (without domain)
  66. if the hostname has the domain name appended.  For example, our domain name
  67. is WPI.EDU.  If we called local_hostname_length("manyjars.wpi.edu"), it
  68. returns 8.  Other examples:
  69.  
  70. Host name    Length returned
  71. ---------    ---------------
  72. manyjars.wpi.edu    8
  73. manyjars        0
  74. nic.near.net        0
  75.  
  76. With this in mind, we wrote this function:
  77.  
  78. #include <sys/param.h>
  79. #include <netinet/in.h>
  80. #include <arpa/inet.h>
  81. #include <arpa/nameser.h>
  82. #include <stdio.h>
  83. #include <resolv.h>
  84. #include <unistd.h>
  85. #include <stdlib.h>
  86.  
  87. int local_hostname_length(hostname)
  88.      char *hostname;
  89. {
  90.   int len_host, len_domain;
  91.  
  92.   if (!*_res.defdname) res_init();
  93.   if (((len_host = strlen(hostname)) > (len_domain = strlen(_res.defdname))) &&
  94.       (strcasecmp(hostname + len_host - len_domain,_res.defdname) == 0) &&
  95.       hostname[len_host - len_domain - 1] == '.')
  96.     return(len_host - len_domain - 1);
  97.   else
  98.     return(0);
  99. }
  100.  
  101. Maybe this can be included in 4.9.2's libresolv.a so it will work properly
  102. under Ultrix without pulling in libc.a's gethostent.o.  If anyone has more
  103. information on Ultrix's local_hostname_length, please let me know so we can
  104. come up with a more complete replacement.
  105.  
  106. -------- End 2 Messages
  107.