summaryrefslogtreecommitdiffstats
path: root/bind-9.3.2b2-sdbsrc.patch
diff options
context:
space:
mode:
Diffstat (limited to 'bind-9.3.2b2-sdbsrc.patch')
-rw-r--r--bind-9.3.2b2-sdbsrc.patch107
1 files changed, 47 insertions, 60 deletions
diff --git a/bind-9.3.2b2-sdbsrc.patch b/bind-9.3.2b2-sdbsrc.patch
index bd0ed32..46e183c 100644
--- a/bind-9.3.2b2-sdbsrc.patch
+++ b/bind-9.3.2b2-sdbsrc.patch
@@ -1,6 +1,21 @@
---- bind-9.3.2b2/contrib/sdb/ldap/zone2ldap.c.sdbsrc 2005-08-16 00:43:03.000000000 -0400
-+++ bind-9.3.2b2/contrib/sdb/ldap/zone2ldap.c 2005-11-15 12:57:44.000000000 -0500
-@@ -59,16 +59,16 @@
+diff --git a/contrib/sdb/bdb/bdb.c b/contrib/sdb/bdb/bdb.c
+index 23594bb..b3c6619 100644
+--- a/contrib/sdb/bdb/bdb.c
++++ b/contrib/sdb/bdb/bdb.c
+@@ -43,7 +43,7 @@
+ #include <dns/lib.h>
+ #include <dns/ttl.h>
+
+-#include <named/bdb.h>
++#include "bdb.h"
+ #include <named/globals.h>
+ #include <named/config.h>
+
+diff --git a/contrib/sdb/ldap/zone2ldap.c b/contrib/sdb/ldap/zone2ldap.c
+index 07c89bc..23dd873 100644
+--- a/contrib/sdb/ldap/zone2ldap.c
++++ b/contrib/sdb/ldap/zone2ldap.c
+@@ -63,16 +63,16 @@ typedef struct LDAP_INFO
ldap_info;
/* usage Info */
@@ -20,7 +35,7 @@
/* Put a hostname into a char ** array */
char **hostname_to_dn_list (char *hostname, char *zone, unsigned int flags);
-@@ -84,7 +84,7 @@
+@@ -88,7 +88,7 @@ void add_to_rr_list (char *dn, char *name, char *type, char *data,
unsigned int ttl, unsigned int flags);
/* Error checking */
@@ -29,7 +44,7 @@
/* Generate LDIF Format files */
void generate_ldap (dns_name_t * dnsname, dns_rdata_t * rdata,
-@@ -93,11 +93,17 @@
+@@ -97,11 +97,17 @@ void generate_ldap (dns_name_t * dnsname, dns_rdata_t * rdata,
/* head pointer to the list */
ldap_info *ldap_info_base = NULL;
@@ -50,16 +65,7 @@
LDAP *conn;
unsigned int debug = 0;
-@@ -106,7 +112,7 @@
- #endif
-
- int
--main (int *argc, char **argv)
-+main (int argc, char **argv)
- {
- isc_mem_t *mctx = NULL;
- isc_entropy_t *ectx = NULL;
-@@ -116,7 +122,7 @@
+@@ -128,7 +134,7 @@ main (int argc, char **argv)
LDAPMod *base_attrs[2];
LDAPMod base;
isc_buffer_t buff;
@@ -68,7 +74,7 @@
char fullbasedn[1024];
char *ctmp;
dns_fixedname_t fixedzone, fixedname;
-@@ -280,9 +286,9 @@
+@@ -304,9 +310,9 @@ main (int argc, char **argv)
if ((*ctmp == ',') || (ctmp == &basedn[0]))
{
base.mod_op = LDAP_MOD_ADD;
@@ -81,7 +87,7 @@
base_attrs[1] = NULL;
if (ldapbase)
-@@ -337,7 +343,7 @@
+@@ -363,7 +369,7 @@ main (int argc, char **argv)
* I should probably rename this function, as not to cause any
* confusion with the isc* routines. Will exit on error. */
void
@@ -90,17 +96,16 @@
{
if (res != ISC_R_SUCCESS)
{
-@@ -449,7 +455,7 @@
- exit (-1);
- }
+@@ -470,20 +476,20 @@ add_to_rr_list (char *dn, char *name, char *type,
+ if (tmp->attrs == (LDAPMod **) NULL)
+ fatal("calloc");
- for (i = 0; i < flags; i++)
+ for (i = 0; i < (int)flags; i++)
{
tmp->attrs[i] = (LDAPMod *) malloc (sizeof (LDAPMod));
if (tmp->attrs[i] == (LDAPMod *) NULL)
-@@ -459,13 +465,13 @@
- }
+ fatal("malloc");
}
tmp->attrs[0]->mod_op = LDAP_MOD_ADD;
- tmp->attrs[0]->mod_type = "objectClass";
@@ -116,7 +121,7 @@
tmp->attrs[1] = NULL;
tmp->attrcnt = 2;
tmp->next = ldap_info_base;
-@@ -474,7 +480,7 @@
+@@ -492,7 +498,7 @@ add_to_rr_list (char *dn, char *name, char *type,
}
tmp->attrs[1]->mod_op = LDAP_MOD_ADD;
@@ -125,8 +130,8 @@
tmp->attrs[1]->mod_values = (char **) calloc (sizeof (char *), 2);
if (tmp->attrs[1]->mod_values == (char **)NULL)
-@@ -496,7 +502,7 @@
- tmp->attrs[2]->mod_values[1] = NULL;
+@@ -521,7 +527,7 @@ add_to_rr_list (char *dn, char *name, char *type,
+ fatal("strdup");
tmp->attrs[3]->mod_op = LDAP_MOD_ADD;
- tmp->attrs[3]->mod_type = "dNSTTL";
@@ -134,16 +139,16 @@
tmp->attrs[3]->mod_values = (char **) calloc (sizeof (char *), 2);
if (tmp->attrs[3]->mod_values == (char **)NULL)
-@@ -507,7 +513,7 @@
- tmp->attrs[3]->mod_values[1] = NULL;
+@@ -535,7 +541,7 @@ add_to_rr_list (char *dn, char *name, char *type,
+ fatal("strdup");
tmp->attrs[4]->mod_op = LDAP_MOD_ADD;
- tmp->attrs[4]->mod_type = "zoneName";
+ tmp->attrs[4]->mod_type = (char*)"zoneName";
tmp->attrs[4]->mod_values = (char **)calloc(sizeof(char *), 2);
- tmp->attrs[4]->mod_values[0] = gbl_zone;
- tmp->attrs[4]->mod_values[1] = NULL;
-@@ -607,7 +613,7 @@
+
+ if (tmp->attrs[4]->mod_values == (char **)NULL)
+@@ -648,7 +654,7 @@ hostname_to_dn_list (char *hostname, char *zone, unsigned int flags)
zname = ++tmp;
}
else
@@ -152,7 +157,7 @@
}
else
{
-@@ -686,12 +692,12 @@
+@@ -727,12 +733,12 @@ init_ldap_conn ()
}
result = ldap_simple_bind_s (conn, binddn, bindpw);
@@ -167,30 +172,10 @@
{
if ((err != LDAP_SUCCESS) && (err != LDAP_ALREADY_EXISTS))
{
-@@ -730,5 +736,8 @@
- usage ()
- {
- fprintf (stderr,
-- "zone2ldap -D [BIND DN] -w [BIND PASSWORD] -b [BASE DN] -z [ZONE] -f [ZONE FILE] -h [LDAP HOST]
-- [-c Create LDAP Base structure][-d Debug Output (lots !)] \n ");}
-+ "zone2ldap -D [BIND DN] -w [BIND PASSWORD] -b [BASE DN] -z [ZONE] -f [ZONE FILE] -h [LDAP HOST]\n"
-+ "\t[-c Create LDAP Base structure][-d Debug Output (lots !)]\n "
-+ );
-+}
-+
---- bind-9.3.2b2/contrib/sdb/bdb/bdb.c.sdbsrc 2002-07-02 00:45:34.000000000 -0400
-+++ bind-9.3.2b2/contrib/sdb/bdb/bdb.c 2005-11-15 12:57:44.000000000 -0500
-@@ -43,7 +43,7 @@
- #include <dns/lib.h>
- #include <dns/ttl.h>
-
--#include <named/bdb.h>
-+#include "bdb.h"
- #include <named/globals.h>
- #include <named/config.h>
-
---- bind-9.3.2b2/contrib/sdb/pgsql/pgsqldb.c.sdbsrc 2004-03-08 04:04:22.000000000 -0500
-+++ bind-9.3.2b2/contrib/sdb/pgsql/pgsqldb.c 2005-11-15 12:57:44.000000000 -0500
+diff --git a/contrib/sdb/pgsql/pgsqldb.c b/contrib/sdb/pgsql/pgsqldb.c
+index 50d3cba..516eb9f 100644
+--- a/contrib/sdb/pgsql/pgsqldb.c
++++ b/contrib/sdb/pgsql/pgsqldb.c
@@ -23,7 +23,7 @@
#include <string.h>
#include <stdlib.h>
@@ -200,8 +185,10 @@
#include <isc/mem.h>
#include <isc/print.h>
---- bind-9.3.2b2/contrib/sdb/pgsql/zonetodb.c.sdbsrc 2005-09-05 22:12:40.000000000 -0400
-+++ bind-9.3.2b2/contrib/sdb/pgsql/zonetodb.c 2005-11-15 12:58:12.000000000 -0500
+diff --git a/contrib/sdb/pgsql/zonetodb.c b/contrib/sdb/pgsql/zonetodb.c
+index b8f5912..ff2d135 100644
+--- a/contrib/sdb/pgsql/zonetodb.c
++++ b/contrib/sdb/pgsql/zonetodb.c
@@ -37,7 +37,7 @@
#include <dns/rdatatype.h>
#include <dns/result.h>
@@ -211,7 +198,7 @@
/*
* Generate a PostgreSQL table from a zone.
-@@ -54,6 +54,9 @@
+@@ -54,6 +54,9 @@ char *dbname, *dbtable;
char str[10240];
void
@@ -221,7 +208,7 @@
closeandexit(int status) {
if (conn != NULL)
PQfinish(conn);
-@@ -61,6 +64,9 @@
+@@ -61,6 +64,9 @@ closeandexit(int status) {
}
void
@@ -231,7 +218,7 @@
check_result(isc_result_t result, const char *message) {
if (result != ISC_R_SUCCESS) {
fprintf(stderr, "%s: %s\n", message,
-@@ -84,7 +90,8 @@
+@@ -84,7 +90,8 @@ quotestring(const unsigned char *source, unsigned char *dest) {
}
*dest++ = 0;
}