]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
exit changes
authorMiek Gieben <miekg@NLnetLabs.nl>
Wed, 31 Aug 2005 08:57:38 +0000 (08:57 +0000)
committerMiek Gieben <miekg@NLnetLabs.nl>
Wed, 31 Aug 2005 08:57:38 +0000 (08:57 +0000)
Changelog
chaos.c
configure.ac
drill/ChangeLog
drill/README
drill/configure.ac
keygen.c
mx.c
signzone.c

index 2f567bdce86d9d60393c61dc7b803a4bb7834259..bcec607b6070e1d629542070b721afab8c970226 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,8 +1,10 @@
-date    : 0.71: ldns-team
+XX Sep 2005: 0.80: ldns-team
        * License change: ldns is now BSD licensed
        * Networking code cleanup, added server udp/tcp support
        * Zonefile parsing was added
-       * Lua binding were created
+       * Lua binding were created 
+       * [tools] Drill was added to ldns - see drill/
+       * [tools] signer was added 
 
 28 Jul 2005: 0.70: ldns-team
        * [func] ldns_pkt_get_section now returns copies from the rrlists
diff --git a/chaos.c b/chaos.c
index 9932d31636f3ddc63e8e8e3e6b7ba32e1821bf93..ddf4d113582687f6a7199d3870421231032b604d 100644 (file)
--- a/chaos.c
+++ b/chaos.c
@@ -38,13 +38,13 @@ main(int argc, char *argv[])
        
        if (argc != 2) {
                usage(stdout, argv[0]);
-               exit(1);
+               exit(EXIT_FAILURE);
        } else {
                /* create a rdf from the command line arg */
                name = ldns_dname_new_frm_str(argv[1]);
                if (!name) {
                        usage(stdout, argv[0]);
-                       exit(1);
+                       exit(EXIT_FAILURE);
                }
        }
 
@@ -55,7 +55,7 @@ main(int argc, char *argv[])
        /* create a new resolver from /etc/resolv.conf */
        res = ldns_resolver_new_frm_file(NULL);
        if (!res) {
-               exit(1);
+               exit(EXIT_FAILURE);
        }
        ldns_resolver_set_retry(res, 1); /* don't want to wait too long */
        
@@ -63,7 +63,7 @@ main(int argc, char *argv[])
        addr = ldns_get_rr_list_addr_by_name(res, name, LDNS_RR_CLASS_IN, LDNS_RD);
        if (!addr) {
                fprintf(stderr, " *** could not get an address for %s\n", argv[1]);
-               exit(1);
+               exit(EXIT_FAILURE);
        }
 
        remove_nameservers(res);
@@ -112,6 +112,5 @@ main(int argc, char *argv[])
                (void)ldns_resolver_pop_nameserver(res);
 
        }
-       exit(0);
-        return 0;
+       exit(EXIT_SUCCESS);
 }
index 8c26cb500f669dd8923297619aa245c2dea38aa3..97e8075fa68af3380091de1fbe60a34567518951 100644 (file)
@@ -1,7 +1,7 @@
 #                                               -*- Autoconf -*-
 # Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.57)
-AC_INIT(libdns, 0.70, libdns@nlnetlabs.nl, libdns)
+AC_INIT(libdns, 0.80, libdns@nlnetlabs.nl, libdns)
 AC_CONFIG_SRCDIR([packet.c])
 
 OURCPPFLAGS='-ansi -pedantic -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600'
index fef63ffe39e794548e80741083e5b2aa992202b5..1ce8b0b7c076743d18688a0de27a94acd4cc1e78 100644 (file)
@@ -1,3 +1,9 @@
+--------- Drill now is a subdirectory in ldns. To make life easier 
+--------- we are using ldns' version numbering for drill from now on. 
+--------- Sadly this means we GO BACKWARDS in the versions
+--------- This ChangeLog will not be updated anymore - all changes are
+--------- documented in ldns' ChangeLog
+
 1.0-pre3: to be released: drill-team
        * Secure tracing works
        * Added section about DNSSEC in the manual page
index 28ce1000e2e24e69877f0e0f280f8b0c78f5a9bf..198a73cf2eef1984d9d735b394d163081cf36ba6 100644 (file)
@@ -1,11 +1,15 @@
 QUICK INSTALL GUIDE
 
-* First install ldns
-  http://www.nlnetlabs.nl/ldns
+drill is a subdirectory in ldns.
 
-  and follow the instructions
+To compile drill you need:
+autoreconf && ./configure --with-ldns=../ && make
 
-* Now configure drill and compile it:
-  autoreconf && ./configure --with-ldns && make
+when ldns isn't installed on the system, or:
 
-  or --with-ldns=<path>, also see ./configure --help
+autoreconf && ./configure --with-ldns && make
+
+when ldns is installed. Also see ./configure --help
+
+In the first case you must run drill as:
+LD_LIBRARY_PATH=../.libs ./drill <options>
index dc6e95f7c057fd616eaea2e9f70f10fbc0b3d874..8cfbb6abc0dda833fbd1850236ba7fc561fb8b4a 100644 (file)
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.57)
-AC_INIT(drill, 1.0-pre3, drill@nlnetlabs.nl, drill1.0-pre)
+AC_INIT(drill, 0.80, drill@nlnetlabs.nl, drill)
 AC_CONFIG_SRCDIR([drill_util.h])
 
 AC_AIX
index 970f597dd823f04b62cb2fe79b21018b240dc674..fe1dfd624c473a75ea08886bc78e409936e4b685 100644 (file)
--- a/keygen.c
+++ b/keygen.c
@@ -47,14 +47,14 @@ main(int argc, char *argv[])
                case 'D':
                        if (algorithm != 0) {
                                fprintf(stderr, "%s: %s", prog, "Only one -D or -A is allowed\n");
-                               exit(1);
+                               exit(EXIT_FAILURE);
                        }
                        algorithm = LDNS_SIGN_DSA;
                        break;
                case 'R':
                        if (algorithm != 0) {
                                fprintf(stderr, "%s: %s", prog, "Only one -D or -A is allowed\n");
-                               exit(1);
+                               exit(EXIT_FAILURE);
                        }
                        algorithm = LDNS_SIGN_RSASHA1;
                        break;
@@ -70,7 +70,7 @@ main(int argc, char *argv[])
                        break;
                default:
                        usage(stderr, prog);
-                       exit(1);
+                       exit(EXIT_FAILURE);
                }
        }
        argc -= optind;
@@ -82,7 +82,7 @@ main(int argc, char *argv[])
 
        if (argc != 1) {
                usage(stderr, prog);
-               exit(1);
+               exit(EXIT_FAILURE);
        } 
 
        /* create an rdf from the domain name */
@@ -107,5 +107,5 @@ main(int argc, char *argv[])
 
        /* print the priv key to stderr */
        ldns_key_print(stderr, key);
-        return 0;
+        exit(EXIT_SUCCESS);
 }
diff --git a/mx.c b/mx.c
index 355fdbd04581ab17370e68e520c0125c912ffbd9..a4a8c8dc9bd9cdb697536b9c2507913775d9ff10 100644 (file)
--- a/mx.c
+++ b/mx.c
@@ -31,13 +31,13 @@ main(int argc, char *argv[])
        
        if (argc != 2) {
                usage(stdout, argv[0]);
-               exit(1);
+               exit(EXIT_FAILURE);
        } else {
                /* create a rdf from the command line arg */
                domain = ldns_dname_new_frm_str(argv[1]);
                if (!domain) {
                        usage(stdout, argv[0]);
-                       exit(1);
+                       exit(EXIT_FAILURE);
                }
        }
 
@@ -45,7 +45,7 @@ main(int argc, char *argv[])
        res = ldns_resolver_new_frm_file(NULL);
 
        if (!res) {
-               exit(1);
+               exit(EXIT_FAILURE);
        }
 
        /* use the resolver to send it a query for the mx 
@@ -56,7 +56,7 @@ main(int argc, char *argv[])
        ldns_rdf_deep_free(domain);
        
         if (!p)  {
-               exit(1);
+               exit(EXIT_FAILURE);
         } else {
                /* retrieve the MX records from the answer section of that
                 * packet
@@ -68,7 +68,7 @@ main(int argc, char *argv[])
                                        argv[1], argv[1]);
                         ldns_pkt_free(p);
                         ldns_resolver_deep_free(res);
-                       exit(1);
+                       exit(EXIT_FAILURE);
                } else {
                        /* sort the list nicely */
                        /* ldns_rr_list_sort(mx); */
index 20d5e1a21afb11d161889a2380e35217f7435a2a..8f0907d9b16e7d639734162b449f8991a0966013 100644 (file)
@@ -15,7 +15,7 @@
 #define DATE_FORMAT "%Y%m%d%H%M%S"
 #define SHORT_DATE_FORMAT "%Y%m%d"
 
-int
+void
 usage(FILE *fp, const char *prog) {
        fprintf(fp, "%s [OPTIONS] <zonefile> <keyfile(s)>\n", prog);
        fprintf(fp, "  signs the zone with the given private key\n");
@@ -25,7 +25,6 @@ usage(FILE *fp, const char *prog) {
        fprintf(fp, "\t\t\tdates can be in YYYYMMDD[HHmmSS] format or timestamps\n");
        fprintf(fp, "  -o <domain>\t\torigin for the zone\n");
        fprintf(fp, "keys and keysigning keys (-k option) can be given multiple times\n");
-       return 0;
 }
 
 int
@@ -110,12 +109,13 @@ main(int argc, char *argv[])
                        if (ldns_str2rdf_dname(&origin, optarg) != LDNS_STATUS_OK) {
                                fprintf(stderr, "Bad origin, not a correct domain name\n");
                                usage(stderr, prog);
-                               exit(1);
+                               exit(EXIT_FAILURE);
                        }
                        
                        break;
                default:
-                       return usage(stderr, prog);
+                       usage(stderr, prog);
+                       exit(EXIT_SUCCESS);
                }
        }
        
@@ -124,7 +124,7 @@ main(int argc, char *argv[])
 
        if (argc < 2) {
                usage(stdout, prog);
-               exit(1);
+               exit(EXIT_FAILURE);
        } else {
                zonefile_name = argv[0];
        }
@@ -135,22 +135,22 @@ main(int argc, char *argv[])
        
        if (!zonefile) {
                fprintf(stderr, "Error: unable to read %s (%s)\n", zonefile_name, strerror(errno));
-               exit(1);
+               exit(EXIT_FAILURE);
        } else {
                orig_zone = ldns_zone_new_frm_fp_l(zonefile, origin, ttl, class, &line_nr);
                if (!orig_zone) {
                        fprintf(stderr, "Zone not read, parse error at %s line %u\n", zonefile_name, line_nr);
-                       exit(1);
+                       exit(EXIT_FAILURE);
                } else {
                        orig_soa = ldns_zone_soa(orig_zone);
                        if (!orig_soa) {
                                fprintf(stderr, "Error reading zonefile: missing SOA record\n");
-                               exit(1);
+                               exit(EXIT_FAILURE);
                        }
                        orig_rrs = ldns_zone_rrs(orig_zone);
                        if (!orig_rrs) {
                                fprintf(stderr, "Error reading zonefile: no resource records\n");
-                               exit(1);
+                               exit(EXIT_FAILURE);
                        }
                }
                fclose(zonefile);
@@ -199,7 +199,7 @@ main(int argc, char *argv[])
        if (ldns_key_list_key_count(keys) < 1) {
                fprintf(stderr, "Error: no keys to sign with. Aborting.\n\n");
                usage(stderr, prog);
-               return 1;
+               exit(EXIT_FAILURE);
        }
                        
        /* read the KSKs */
@@ -240,6 +240,7 @@ main(int argc, char *argv[])
                ldns_zone_deep_free(signed_zone); 
        } else {
                fprintf(stderr, "Error signing zone.");
+               exit(EXIT_FAILURE);
        }
        
        ldns_key_list_free(keys);
@@ -247,5 +248,5 @@ main(int argc, char *argv[])
        ldns_zone_deep_free(orig_zone);
        
        LDNS_FREE(key_signing_key_filenames);
-        return 0;
+        exit(EXIT_SUCCESS);
 }