]> granicus.if.org Git - pdns/commitdiff
lots
authorBert Hubert <bert.hubert@netherlabs.nl>
Tue, 10 Dec 2002 13:36:26 +0000 (13:36 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Tue, 10 Dec 2002 13:36:26 +0000 (13:36 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@64 d19b8d6e-7fed-0310-83ef-9ca221ded41b

12 files changed:
Makefile.am
README
configure.in
modules/oraclebackend/Makefile [deleted file]
modules/oraclebackend/Makefile.in [new file with mode: 0644]
modules/oraclebackend/OBJECTFILES [new file with mode: 0644]
modules/oraclebackend/OBJECTLIBS [new file with mode: 0644]
pdns/Makefile.am
pdns/choosepaths [deleted file]
pdns/docs/pdns.sgml
pdns/nameserver.cc
pdns/tcpreceiver.cc

index c394f38dd861262b999dc8d889a6fff0978177f5..f321a9134d28dc579141030a7ecd4275882ada5a 100644 (file)
@@ -1,5 +1,5 @@
 SUBDIRS=modules pdns
-EXTRA_DIST=TODO WARNING README HACKING INSTALL ChangeLog debian
+EXTRA_DIST=TODO WARNING README HACKING INSTALL ChangeLog debian pdns.spec
 
 install-exec-local: 
        @echo "***********************************************************"
diff --git a/README b/README
index 59a866e552929367cfa5ea64c6eab03c67747ee7..f9076ba4b958e75ebb6a83e7d6c9b5b3dcee271f 100644 (file)
--- a/README
+++ b/README
@@ -19,7 +19,8 @@ See http://rtfm.powerdns.com/compiling-powerdns.html for more details.
 
 SOLARIS NOTES
 -------------
-You need gcc 3.x, preferably 3.2!
+You need gcc 3.x, preferably 3.2! The 'Sunpro' compiler is currently not
+supported (patches are welcome if not too intrusive).
 If you encounter problems with the Solaris make, gmake is advised
 
 IPv6 is currently (2.9.1.) broken in Solaris, awaiting patches!
index 34cb77c491b2b00d37707d81258358f4da744cef..02d020c3928ceed189e4e4a82a50de5566a99467 100644 (file)
@@ -30,12 +30,12 @@ dnl Checks for library functions.
 AC_TYPE_SIGNAL
 AC_CHECK_FUNCS(gethostname gettimeofday mkdir mktime select socket strerror)
 
-AC_CHECK_LIB(resolv, inet_ntop)
+#AC_CHECK_LIB(resolv, inet_ntop)
 
-dnl AC_MSG_NOTICE([Looking in libraries: $LIBS])
+#dnl AC_MSG_NOTICE([Looking in libraries: $LIBS])
 
-AC_CHECK_FUNCS(inet_ntop, , AC_LIBOBJ(lib/inet_ntop)) 
-AC_CHECK_FUNCS(inet_pton, , AC_LIBOBJ(lib/inet_pton))
+#AC_CHECK_FUNCS(inet_ntop, , AC_LIBOBJ(lib/inet_ntop)) 
+#AC_CHECK_FUNCS(inet_pton, , AC_LIBOBJ(lib/inet_pton))
 
 
 #
@@ -94,25 +94,37 @@ then
   fi
 fi
 
+DYNLINKFLAGS=""
 case "$host_os" in
-solaris2*
+solaris2.8 | solaris2.9 
        AC_DEFINE(NEED_POSIX_TYPEDEF,,[If POSIX typedefs need to be defined])
        AC_DEFINE(NEED_INET_NTOP_PROTO,,[If your OS is so broken that it needs an additional prototype])
-       LIBS="-lposix4 -lnsl -lsocket -lpthread $LIBS"
+       AC_DEFINE(HAVE_IPV6,1,[If the host operating system understands IPv6])
+       LIBS="-lposix4 -lresolv -lnsl -lsocket -lpthread $LIBS"
+       CXXFLAGS="-D_REENTRANT $CXXFLAGS"
+       ;;
+solaris2.6 | solaris2.7) 
+       AC_DEFINE(NEED_POSIX_TYPEDEF,,[If POSIX typedefs need to be defined])
+       AC_DEFINE(NEED_INET_NTOP_PROTO,,[If your OS is so broken that it needs an additional prototype])
+       LIBS="-lposix4 -lresolv -lnsl -lsocket -lpthread $LIBS"
        CXXFLAGS="-D_REENTRANT $CXXFLAGS"
        ;;
 linux*)
        AC_DEFINE(HAVE_IPV6,1,[If the host operating system understands IPv6])
+       DYNLINKFLAGS="-rdynamic"
        LDFLAGS="-pthread $LDFLAGS"
        CXXFLAGS="-pthread -D_GNU_SOURCE $CXXFLAGS"
        ;;
 *)
        AC_DEFINE(HAVE_IPV6,1,[If the host operating system understands IPv6])
+       DYNLINKFLAGS="-rdynamic"
        LDFLAGS="-pthread $LDFLAGS"
        CXXFLAGS="-pthread $CXXFLAGS"
        ;;
 esac
 
+AC_SUBST(DYNLINKFLAGS)
+
 AC_MSG_CHECKING(whether we will be doing verbose logging)
 AC_ARG_ENABLE(verbose-logging, 
  [  --enable-verbose-logging   Do verbose logging],enable_verbose_logging=yes ,enable_verbose_logging=no)
@@ -348,4 +360,4 @@ AC_OUTPUT(Makefile modules/Makefile pdns/Makefile pdns/codedocs/Makefile \
 pdns/backends/Makefile pdns/backends/bind/Makefile pdns/pdns \
 modules/mysqlbackend/Makefile modules/pdnsbackend/Makefile \
 modules/pgmysqlbackend/Makefile modules/db2backend/Makefile \
-modules/pipebackend/Makefile )
+modules/pipebackend/Makefile modules/oraclebackend/Makefile)
diff --git a/modules/oraclebackend/Makefile b/modules/oraclebackend/Makefile
deleted file mode 100644 (file)
index 953fcf2..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-##
-## File    : Makefile
-## Author  : Stefan Arentz
-## Project : PowerDNS
-## Version : $Id: Makefile,v 1.1 2002/11/27 15:35:52 ahu Exp $
-##
-
-ORACLE_HOME    = /opt/oracle
-PDNS_HOME      = ../ahudns
-
-INCLUDE                = -I$(ORACLE_HOME)/rdbms/demo \
-                 -I$(ORACLE_HOME)/rdbms/public \
-                 -I$(PDNS_HOME)
-VERSION=2.1
-
-all: liboraclebackend.so
-
-
-DIRNAME=pdns-oraclebackend-$(VERSION)
-
-dist:
-       mkdir $(DIRNAME)
-       cp oraclebackend.cc oraclebackend.hh Makefile README LICENSE $(DIRNAME) 
-
-       tar cvzf $(DIRNAME).tar.gz $(DIRNAME)
-       rm -rf $(DIRNAME)
-
-
-liboraclebackend.so: oraclebackend.o
-       g++ -shared -o liboraclebackend.so oraclebackend.o -L$(ORACLE_HOME)/lib -lclntsh -lwtc8
-
-liboraclebackend.o: oraclebackend.cc oraclebackend.hh
-
-install: liboraclebackend.so
-       cp liboraclebackend.so /usr/lib/powerdns/
-
-.SUFFIXES:
-.SUFFIXES: .cc .o
-
-.cc.o:
-       g++ -g -c $(LCFLAGS) $(INCLUDE) $<
-
-clean:
-       rm -f *.o *.so
-
diff --git a/modules/oraclebackend/Makefile.in b/modules/oraclebackend/Makefile.in
new file mode 100644 (file)
index 0000000..717d71d
--- /dev/null
@@ -0,0 +1,50 @@
+##
+## File    : Makefile
+## Author  : Stefan Arentz
+## Project : PowerDNS
+## Version : $Id: Makefile.in,v 1.1 2002/12/10 13:36:26 ahu Exp $
+##
+
+ORACLE_HOME    = /opt/oracle
+PDNS_HOME      = ../../pdns
+
+INCLUDE                = -I$(ORACLE_HOME)/rdbms/demo \
+                 -I$(ORACLE_HOME)/rdbms/public \
+                 -I$(PDNS_HOME) -I../..
+VERSION=2.1
+
+all: oraclebackend.o
+
+install: 
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+DISTFILES=*.cc *.hh Makefile.in OBJECTFILES OBJECTLIBS
+
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+       @for file in $(DISTFILES); do \
+         if test -f $$file; then d=.; else d=$(srcdir); fi; \
+         dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+         if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+           $(mkinstalldirs) "$(distdir)/$$dir"; \
+         fi; \
+         if test -d $$d/$$file; then \
+           cp -pR $$d/$$file $(distdir) \
+           || exit 1; \
+         else \
+           test -f $(distdir)/$$file \
+           || cp -p $$d/$$file $(distdir)/$$file \
+           || exit 1; \
+         fi; \
+       done
+
+
+.cc.o:
+       g++ -g -c $(CXXFLAGS) $(INCLUDE) $<
+
+clean:
+       rm -f *.o *.so *~
+
diff --git a/modules/oraclebackend/OBJECTFILES b/modules/oraclebackend/OBJECTFILES
new file mode 100644 (file)
index 0000000..ac8cc25
--- /dev/null
@@ -0,0 +1 @@
+oraclebackend.o
diff --git a/modules/oraclebackend/OBJECTLIBS b/modules/oraclebackend/OBJECTLIBS
new file mode 100644 (file)
index 0000000..3c460f0
--- /dev/null
@@ -0,0 +1 @@
+-ldl -L/opt/oracle/lib -ldl -lclient8  -ldl -lclntst8
\ No newline at end of file
index 2708eceeda10d5030f2cb3cc07f43530752efd87..e334afa5e8d6539d0a30cf3b7d7d89507cfb16be 100644 (file)
@@ -4,8 +4,7 @@ AM_CPPFLAGS=-Ibackends/bind
 EXTRA_DIST = codedocs/Makefile codedocs/doxygen.conf docs/Makefile \
 docs/gslb-operations.sgml docs/powerdns-case.sgml docs/powerdns-install.sgml \
 docs/powerdns-overview.sgml docs/powerdns-technical.sgml  \
-pdns.spec release-scripts/ docs/pdns.sgml \
-choosepaths mtasker.cc 
+ release-scripts/ docs/pdns.sgml mtasker.cc 
 
 noinst_SCRIPTS = pdns
 sysconf_DATA = pdns.conf-dist 
@@ -31,7 +30,7 @@ backends/bind/bindparser.cc backends/bind/bindlexer.c \
 backends/bind/huffman.cc
 
 #
-pdns_server_LDFLAGS=-rdynamic @LIBDL@ @moduleobjects@ @modulelibs@ 
+pdns_server_LDFLAGS=@DYNLINKFLAGS@ @LIBDL@ @moduleobjects@ @modulelibs@ 
 pdns_server_INCLUDES=
 
 
diff --git a/pdns/choosepaths b/pdns/choosepaths
deleted file mode 100755 (executable)
index cbe3235..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/sh
-IB="dialog --inputbox"
-MB="dialog --msgbox"
-YN="dialog --yesno"
-
-. ./pathconfig
-
-$MB "\nWelcome to the PowerDNS installation program!\n\nPlease select \
-locations for the different PowerDNS files." 11 60
-
-redo=1
-while [ "$redo" = "1" ]
-do
-echo $redo
-
-askPath()
-{
-       val=`eval echo \\$$2`
-       $IB "$1\n\n" 10 60 $val 2> ./dialog.tmp
-       if [ "$?" != "0" ] ; then exit ; fi
-       eval $2=`cat ./dialog.tmp`
-}
-
-askPath "Intended location of your init.d scripts" INITDPATH
-askPath "Intended location of your binaries" BINARYPATH 
-askPath "Intended location of your configuration files" CONFIGPATH  
-askPath "Intended location of the controlsocket directory" SOCKETPATH 
-askPath "Intended location of the PowerDNS plugins directory" LIBRARYPATH  
-askPath "Intended location of the PowerDNS documentation directory" DOCPATH  
-
-$MB "\nPowerDNS can be configured to run as an\n\
-unprivileged user.\n\
-This is highly recommended. You should\n\
-now create a user and a group for PDNS\n\
-to run as and then press enter, \n\
-after which you will be asked for\n\
-the identity." 15 60
-
-askPath "Intended user id for PDNS to run as" PDNSUID
-askPath "Intended group id for PDNS to run as" PDNSGID
-
-$YN "Do you accept these values?\n\ninit.d: $INITDPATH\n\
-binaries: $BINARYPATH\n\
-configuration: $CONFIGPATH\n\
-sockets: $SOCKETPATH\n\
-plugins: $LIBRARYPATH\n\
-documentation: $DOCPATH\n\
-uid: $PDNSUID\n\
-gid: $PDNSGID\n" 15 60
-redo=$?
-echo $ready
-done
-
-mv pathconfig pathconfig.old 2> /dev/null > /dev/null
-
-(echo INITDPATH=$INITDPATH
-echo BINARYPATH=$BINARYPATH
-echo CONFIGPATH=$CONFIGPATH
-echo SOCKETPATH=$SOCKETPATH
-echo LIBRARYPATH=$LIBRARYPATH
-echo PDNSUID=$PDNSUID
-echo DOCPATH=$DOCPATH
-echo PDNSGID=$PDNSGID) > pathconfig
-
-$MB "\nDone recording your directory preferences." 7 70
-
-
index 4784e5b837aaeb5036ae716b3da73911421e8239..ebb5f9a46d2e8b9740eec8c349b9a9e0d9d12b5b 100644 (file)
@@ -15,7 +15,7 @@
       </affiliation>
     </author>
     
-    <PubDate>v2.1 $Date: 2002/12/09 16:24:17 $</PubDate>
+    <PubDate>v2.1 $Date: 2002/12/10 13:36:26 $</PubDate>
     
     <Abstract>
        <para>  
        Before proceeding, it is advised to check the release notes for your PDNS version, as specified in the name of the distribution
        file.
       </para>
+      <sect2 id="changelog-2-9-1"><title>Version 2.9.1</title> 
+       <para>
+         Thanks to the great enthusiasm from around the world, powerdns is now available for Solaris and FreeBSD users again! 
+         Furthermore, the Windows build is back. We are very grateful for the help of:
+       </para>
+       <para>  
+         <itemizedlist>
+           <listitem><para>Michel Stol</para></listitem>
+           <listitem><para>Wichert Akkerman</para></listitem>
+           <listitem><para>Edvard Tuinder</para></listitem>
+           <listitem><para>Koos van den Hout</para></listitem>
+           <listitem><para>Niels Bakker</para></listitem>
+           <listitem><para>Erik Bos</para></listitem>
+           <listitem><para>Alex Bleker</para></listitem>
+           <listitem><para>steven stillaway</para></listitem>
+           <listitem><para>Roel van der Made</para></listitem>
+           <listitem><para>Steven Van Steen</para></listitem>
+         </itemizedlist>
+       </para>
+       <para>
+         We are happy to have been able to work with the open source community to improve PowerDNS!
+       </para>
+       <para>
+         Changes:
+         <itemizedlist>
+           <listitem>
+             <para>
+               The monitor command <command>set</command> no longer allows the changing of non-existant variables.
+             </para>
+           </listitem>
+           <listitem>
+             <para>
+               IBM Universal Database DB2 backend now included in source distribution (untested!)
+             </para>
+           </listitem>
+           <listitem>
+             <para>
+               Oracle backend now included in source distribution (sligthly tested!)
+             </para>
+           </listitem>
+           <listitem>
+             <para>
+               configure script now searches for postgresql and mysql includes
+             </para>
+           </listitem>
+           <listitem>
+             <para>
+               Bind parser now no longer dies on records with a ' in them (Erik Bos)
+             </para>
+           </listitem>
+           <listitem>
+             <para>
+               The pipebackend was accidentally left out of 2.9
+             </para>
+           </listitem>
+           <listitem>
+             <para>
+               FreeBSD fixes (with help from Erik Bos, Alex Bleeker, Niels Bakker)
+             </para>
+           </listitem>
+           <listitem>
+             <para>
+               Heap of Solaris work (with help from Edvard Tuinder, Stefan Van Steen, Koos van den Hout, Roel van der Made and 
+               especially Mark Bakker).
+               Now compiles in 2.7 and 2.8. May be a bit dysfunctional on 2.7 though - it won't do IPv6 and it won't serve AAAA. Patches
+               welcome!
+             </para>
+           </listitem>
+           <listitem>
+             <para>
+               Windows 32 build is back! Michel Stol updated his earlier work to the current version.
+             </para>
+           </listitem>
+           <listitem>
+             <para>
+               S/Linux (Linux on Sparc) build works now (with help from steven stillaway).
+             </para>
+           </listitem>
+           <listitem>
+             <para>
+               Silly debugging message ('sd.ttl from cache') removed
+             </para>
+           </listitem>
+           <listitem>
+             <para>
+               .debs are back, hopefully in 'sid' soon! (Wichert Akkerman)
+             </para>
+           </listitem>
+           <listitem>
+             <para>
+               Removal of bzero and other less portable constructs. Discovered that recent Linux glibc's need -D_GNU_SOURCE (Wichert Akkerman).
+             </para>
+           </listitem>
+         </itemizedlist>
+       </para>
+      </sect2>
       <sect2 id="changelog-2-9"><title>Version 2.9</title>     
        <para>
        Open source release. Do not deploy unless you know what you are
@@ -6548,7 +6644,7 @@ static RandomLoader randomloader;
     </para>
     <sect1 id="on-windows"><title>Compiling PowerDNS on Windows</title>
       <para>
-       By Michael Stol (<email>michael@physos.info</email>).
+       By Michel Stol (<email>michel@powerdns.com</email>).
       <sect2><title>Assumptions</title>
         <para>
          I will assume these things from you:      
@@ -6915,7 +7011,7 @@ static RandomLoader randomloader;
        
        <para>
          If you are pretty sure that it's a bug, either in the PowerDNS sources, the build
-         system or in this article, then please send an e-mail to <email>powerdns-dev@mailman.powerdns.com</email> describing your
+         system or in this article, then please send an e-mail to <email>pdns-dev@mailman.powerdns.com</email> describing your
          problem. We will then try to fix it.
        </para>
        
@@ -6991,7 +7087,7 @@ static RandomLoader randomloader;
        
        <para>
          If you have a comment, or a bug report concerning either this document or the PowerDNS sources
-         you can contact <email>powerdns-dev@mailman.powerdns.com</email>
+         you can contact <email>pdns-dev@mailman.powerdns.com</email>
        </para>
        
        <para>
@@ -7006,7 +7102,7 @@ static RandomLoader randomloader;
        
        <para>
          If you want to praise my work, ask me to marry you, deposit $1.000.000 on my bank account or flame me to death, then 
-         you can mail me at <email>michel@physos.info</email> :)
+         you can mail me at <email>michel@powerdns.com</email> :)
        </para>
        
       </sect3>
index f8d1e2fe7fe2fcae4e598ffa1b614f85e799344a..1ef97afe52baa769208f22b0959710c6f3794571 100644 (file)
@@ -15,7 +15,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-// $Id: nameserver.cc,v 1.2 2002/12/09 16:24:17 ahu Exp $ 
+// $Id: nameserver.cc,v 1.3 2002/12/10 13:36:26 ahu Exp $ 
 #include "utility.hh"
 #include <cstdio>
 #include <cstring>
@@ -148,31 +148,30 @@ void UDPNameserver::bindIPv6()
   int s;
   for(vector<string>::const_iterator i=locals.begin();i!=locals.end();++i) {
     string localname(*i);
-    struct sockaddr_in6 locala;
 
     s=socket(AF_INET6,SOCK_DGRAM,0);
     if(s<0)
       throw AhuException("Unable to acquire a UDPv6 socket: "+string(strerror(errno)));
   
-    memset(&locala,0,sizeof(locala));
-    locala.sin6_family=AF_INET6;
-
     if(localname=="::0") {
       L<<Logger::Warning<<"It is advised to bind to explicit addresses with the --local-ipv6 option"<<endl;
     }
 
-    struct hostent *h;
-
-    h=gethostbyname2(localname.c_str(),AF_INET6);
-
-    if(!h)
-      throw AhuException("Unable to resolve local IPv6 address"); 
-    
-    memcpy(&locala.sin6_addr.s6_addr,h->h_addr,16);
+    sockaddr_in6 locala;
+    locala.sin6_port=ntohs(arg().asNum("local-port"));
+    if(!inet_pton(AF_INET6, localname.c_str(), (void *)&locala.sin6_addr)) {
+      addrinfo *addrinfos;
+      addrinfo hints;
+      memset(&hints,0,sizeof(hints));
+      hints.ai_socktype=SOCK_DGRAM;
+      hints.ai_family=AF_INET6;
+
+      if(getaddrinfo(localname.c_str(),arg()["local-port"].c_str(),&hints,&addrinfos))
+       throw AhuException("Unable to resolve local IPv6 address '"+localname+"'"); 
+      memcpy(&locala,addrinfos->ai_addr,addrinfos->ai_addrlen);
+    }
 
-    locala.sin6_port=htons(arg().asNum("local-port"));
-    
-    if(bind(s, (sockaddr*)&locala,sizeof(locala))<0) {
+    if(bind(s, (sockaddr*)&locala, sizeof(locala))<0) {
       L<<Logger::Error<<"binding to UDP ipv6 socket: "<<strerror(errno)<<endl;
       throw AhuException("Unable to bind to UDP ipv6 socket");
     }
index 0909308be4e4df5b15be407f312f61a2a14dc0ed..db57e40c8884637baab85842a2d508af641d8004 100644 (file)
@@ -438,22 +438,26 @@ TCPNameserver::TCPNameserver()
   // TODO: Implement ipv6
 #if !WIN32 && HAVE_IPV6
   for(vector<string>::const_iterator laddr=locals6.begin();laddr!=locals6.end();++laddr) {
-    struct sockaddr_in6 local;
     int s=socket(AF_INET6,SOCK_STREAM,0); 
 
     if(s<0) 
       throw AhuException("Unable to acquire TCPv6 socket: "+stringerror());
-    
-    memset(&local,0,sizeof(local));
-    local.sin6_family=AF_INET6;
-    struct hostent *h;
-    h=gethostbyname2(laddr->c_str(),AF_INET6);
-  
-    if(!h)
-      throw AhuException("Unable to resolve local address '"+*laddr+"'");
+
+    sockaddr_in6 locala;
+    locala.sin6_port=ntohs(arg().asNum("local-port"));
+
+    if(!inet_pton(AF_INET6, laddr->c_str(), (void *)&locala.sin6_addr)) {
+      addrinfo *addrinfos;
+      addrinfo hints;
+      memset(&hints,0,sizeof(hints));
+      hints.ai_socktype=SOCK_STREAM;
+      hints.ai_family=AF_INET6;
       
-    memcpy(&local.sin6_addr.s6_addr,h->h_addr,16);
-    local.sin6_port=htons(arg().asNum("local-port"));
+      if(getaddrinfo(laddr->c_str(),arg()["local-port"].c_str(),&hints,&addrinfos)) 
+       throw AhuException("Unable to resolve local IPv6 address '"+*laddr+"'"); 
+
+      memcpy(&locala,addrinfos->ai_addr,addrinfos->ai_addrlen);
+    }
 
     int tmp=1;
     if(setsockopt(s,SOL_SOCKET,SO_REUSEADDR,(char*)&tmp,sizeof tmp)<0) {
@@ -461,7 +465,7 @@ TCPNameserver::TCPNameserver()
       exit(1);  
     }
 
-    if(bind(s, (sockaddr*)&local,sizeof(local))<0) {
+    if(bind(s, (const sockaddr*)&locala, sizeof(locala))<0) {
       L<<Logger::Error<<"binding to TCP socket: "<<strerror(errno)<<endl;
       throw AhuException("Unable to bind to TCPv6 socket");
     }