Preparing for ldap2dns-0.3.6
+ Fixed bug with duplicate OIDs in dns.schema from partially applied patch + Renamed schema file to ldap2dns.schema + Updated RPM specfile (UNTESTED, may need editing) + Removed already merged patchfiles + Restructured file layout, created doc directory + Deprecated unfinished webadmin work. Will be replaced with Beatnik + Deprecated OpenLDAP 2.0 schema support + Deprecated djbdns-1.0.5 native LDAP patch (status of patch unknown) + Removed old index.html + Removed TODO.schema + Updated Makefile git-svn-id: https://svn.alkaloid.net/gpl/ldap2dns/trunk@124 06cd67b6-e706-0410-b29e-9de616bca6e9
10
CHANGELOG
@@ -5,6 +5,16 @@ Version ?.?.? (next)
|
||||
|
||||
Version 0.3.6 (latest)
|
||||
+ Fixed bug with duplicate OIDs in dns.schema from partially applied patch
|
||||
+ Renamed schema file to ldap2dns.schema
|
||||
+ Updated RPM specfile (UNTESTED, may need editing)
|
||||
+ Removed already merged patchfiles
|
||||
+ Restructured file layout, created doc directory
|
||||
+ Deprecated unfinished webadmin work. Will be replaced with Beatnik
|
||||
+ Deprecated OpenLDAP 2.0 schema support
|
||||
+ Deprecated djbdns-1.0.5 native LDAP patch (status of patch unknown)
|
||||
+ Removed old index.html
|
||||
+ Removed TODO.schema
|
||||
+ Updated Makefile
|
||||
|
||||
Version 0.3.5 - 2005/11/30
|
||||
+ Added support for DNS SRV records
|
||||
|
||||
20
Makefile
@@ -1,5 +1,5 @@
|
||||
# $Id: Makefile,v 1.30 2003/01/20 14:33:25 jrief Exp $
|
||||
VERSION=0.3.4
|
||||
VERSION=0.3.6
|
||||
RELEASE=1
|
||||
CC=gcc -O2
|
||||
CCDEBUG=gcc -g
|
||||
@@ -10,10 +10,14 @@ LDFLAGS=
|
||||
INSTALL_PREFIX=
|
||||
PREFIXDIR=$(INSTALL_PREFIX)/usr
|
||||
LDAPCONFDIR=$(INSTALL_PREFIX)/etc/openldap
|
||||
TARFILE=/usr/src/redhat/SOURCES/ldap2dns-$(VERSION).tar.gz
|
||||
SPECFILE=ldap2dns.spec
|
||||
RPMSRCDIR=/usr/src/packages/SOURCES
|
||||
# For Red Hat use
|
||||
# make RPMSRCDIR=/usr/src/redhat/SOURCES rpm
|
||||
|
||||
all: ldap2dns ldap2dnsd ldap2dns-dbg
|
||||
all: ldap2dns ldap2dnsd
|
||||
|
||||
debug: ldap2dns-dbg
|
||||
|
||||
ldap2dns: ldap2dns.o $(LIBS)
|
||||
$(LD) $(LDFLAGS) -o $@ $+
|
||||
@@ -36,14 +40,17 @@ install: all
|
||||
install -s -o root -g root -m 755 ldap2dns $(PREFIXDIR)/bin/
|
||||
ln -f $(PREFIXDIR)/bin/ldap2dns $(PREFIXDIR)/bin/ldap2dnsd
|
||||
install -o root -g root -m 755 ldap2tinydns-conf $(PREFIXDIR)/bin/
|
||||
install -o root -g root -m 644 dns.schema $(LDAPCONFDIR)/schema/
|
||||
install -o root -g root -m 644 ldap2dns.schema $(LDAPCONFDIR)/schema/
|
||||
|
||||
clean:
|
||||
rm -f *.o *.o-dbg ldap2dns ldap2dnsd data* *.db core $(SPECFILE)
|
||||
|
||||
tar: clean
|
||||
cd ..; \
|
||||
tar czf $(TARFILE) ldap2dns-$(VERSION) --exclude CVS
|
||||
mv ldap2dns ldap2dns-$(VERSION); \
|
||||
tar --exclude .svn -czf ldap2dns-$(VERSION).tar.gz ldap2dns-$(VERSION); \
|
||||
mv ldap2dns-$(VERSION) ldap2dns; \
|
||||
cd ldap2dns
|
||||
|
||||
$(SPECFILE): Specfile
|
||||
sed -e 's#%VERSION%#$(VERSION)#g' \
|
||||
@@ -51,6 +58,7 @@ $(SPECFILE): Specfile
|
||||
< $< > $@
|
||||
|
||||
rpm: tar $(SPECFILE)
|
||||
rpm -ba $(SPECFILE)
|
||||
mv ../ldap2dns-$(VERSION).tar.gz $(RPMSRCDIR)
|
||||
rpmbuild -ba $(SPECFILE)
|
||||
|
||||
|
||||
|
||||
29
Specfile
@@ -1,5 +1,3 @@
|
||||
%define djbdns djbdns-1.02
|
||||
|
||||
Summary: LDAP to DNS gateway.
|
||||
Name: ldap2dns
|
||||
Version: %VERSION%
|
||||
@@ -8,19 +6,19 @@ Copyright: GPL
|
||||
Group: Daemons/DNS
|
||||
Source: ldap2dns-%{version}.tar.gz
|
||||
BuildRoot: /var/tmp/%{name}-root
|
||||
Requires: openldap
|
||||
Requires: openldap-devel
|
||||
|
||||
%description
|
||||
ldap2dns is a program to create DNS records directly from an LDAP database. It can
|
||||
be be used to replace the secondary name-server by a second primary one.
|
||||
ldap2dns helps to reduce all kind of administration overhead. No more flat file editing,
|
||||
no more zone file editing. After having installed ldap2dns, the administrator only has
|
||||
to access the LDAP database.
|
||||
If he desires he can add access control for each zone, create a webbased GUI and add
|
||||
all other kind of zone and resource record information without interfering with the DNS
|
||||
server.
|
||||
ldap2dns is designed to write binary data.cdb files used by tinydns, but also may be
|
||||
used to write .db-files used by named.
|
||||
ldap2dns is a program to create DNS records directly from an LDAP database. It
|
||||
can be be used to replace the secondary name-server by a second primary one.
|
||||
ldap2dns helps to reduce all kind of administration overhead. No more flat file
|
||||
editing, no more zone file editing. After having installed ldap2dns, the
|
||||
administrator only has to access the LDAP database.
|
||||
If he desires he can add access control for each zone, create a webbased GUI
|
||||
and add all other kind of zone and resource record information without
|
||||
interfering with the DNS server.
|
||||
ldap2dns is designed to write binary data.cdb files used by tinydns, but also
|
||||
may be used to write .db-files used by named.
|
||||
|
||||
%prep
|
||||
%setup
|
||||
@@ -42,10 +40,11 @@ make INSTALL_PREFIX=$RPM_BUILD_ROOT install
|
||||
/usr/bin/ldap2tinydns-conf
|
||||
%doc README.html
|
||||
%doc import.pl
|
||||
%config /etc/openldap/dns.at.conf
|
||||
%config /etc/openldap/dns.oc.conf
|
||||
%config /etc/openldap/schema/ldap2dns.schema
|
||||
|
||||
%changelog
|
||||
* Sun Dec 04 2005 Ben Klang <ben@alkaloid.net>
|
||||
- Updated Specfile to version 0.3.6
|
||||
* Wed Dec 06 2000 Jacob Rief <jacob.rief@tiscover.com>
|
||||
- initial revision for version 0.2.0
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
# schema for DNS data# include this file into Your slapd.conf for openldap-2.0.x# $Id: dns.schema,v 1.9 2001/11/06 08:01:51 config Exp $attributetype ( 1.3.6.1.4.1.7222.1.4.1 NAME 'dnszonename' SUP name )attributetype ( 1.3.6.1.4.1.7222.1.4.2 NAME 'dnsserial' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )attributetype ( 1.3.6.1.4.1.7222.1.4.3 NAME 'dnsrefresh' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )attributetype ( 1.3.6.1.4.1.7222.1.4.4 NAME 'dnsretry' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )attributetype ( 1.3.6.1.4.1.7222.1.4.5 NAME 'dnsexpire' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )attributetype ( 1.3.6.1.4.1.7222.1.4.6 NAME 'dnsminimum' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )attributetype ( 1.3.6.1.4.1.7222.1.4.7 NAME 'dnsadminmailbox' SUP name )attributetype ( 1.3.6.1.4.1.7222.1.4.8 NAME 'dnszonemaster' SUP name )attributetype ( 1.3.6.1.4.1.7222.1.4.9 NAME 'dnstype' SUP name )attributetype ( 1.3.6.1.4.1.7222.1.4.10 NAME 'dnsclass' SUP name )attributetype ( 1.3.6.1.4.1.7222.1.4.11 NAME 'dnsdomainname' SUP name )attributetype ( 1.3.6.1.4.1.7222.1.4.12 NAME 'dnsipaddr' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{16} ) SINGLE-VALUE )attributetype ( 1.3.6.1.4.1.7222.1.4.13 NAME 'dnscipaddr' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreIA5SubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{16} )attributetype ( 1.3.6.1.4.1.7222.1.4.14 NAME 'dnscname' SUP name )attributetype ( 1.3.6.1.4.1.7222.1.4.15 NAME 'dnspreference' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )attributetype ( 1.3.6.1.4.1.7222.1.4.16 NAME 'dnsrr' SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )attributetype ( 1.3.6.1.4.1.7222.1.4.17 NAME 'dnsttl' EQUALITY integerMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )attributetype ( 1.3.6.1.4.1.7222.1.4.18 NAME 'dnstimestamp' SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )attributetype ( 1.3.6.1.4.1.7222.1.4.21 NAME 'NIChandle' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{16} )attributetype ( 1.3.6.1.4.1.7222.1.4.22 NAME 'TIShandle' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{16} )objectclass ( 1.3.6.1.4.1.7222.1.4.19 NAME 'dnszone' MUST ( objectclass $ cn ) MAY ( dnszonename $ dnsserial $ dnsrefresh $ dnsretry $ dnsexpire $ dnsminimum $ dnsadminmailbox $ dnszonemaster $ dnstype $ dnsclass $ dnsttl $ dnstimestamp $ owner $ NIChandle $ TIShandle ) )objectclass ( 1.3.6.1.4.1.7222.1.4.20 NAME 'dnsrrset' SUP dnszone MUST ( objectclass $ cn ) MAY ( dnsdomainname $ dnsrr $ dnsclass $ dnstype $ dnsipaddr $ dnscipaddr $ dnscname $ dnspreference $ dnsttl $ dnstimestamp $ owner ) )
|
||||
|
Before Width: | Height: | Size: 849 B After Width: | Height: | Size: 849 B |
|
Before Width: | Height: | Size: 843 B After Width: | Height: | Size: 843 B |
|
Before Width: | Height: | Size: 887 B After Width: | Height: | Size: 887 B |
|
Before Width: | Height: | Size: 911 B After Width: | Height: | Size: 911 B |
|
Before Width: | Height: | Size: 834 B After Width: | Height: | Size: 834 B |
|
Before Width: | Height: | Size: 844 B After Width: | Height: | Size: 844 B |
|
Before Width: | Height: | Size: 867 B After Width: | Height: | Size: 867 B |
|
Before Width: | Height: | Size: 864 B After Width: | Height: | Size: 864 B |
|
Before Width: | Height: | Size: 872 B After Width: | Height: | Size: 872 B |
|
Before Width: | Height: | Size: 871 B After Width: | Height: | Size: 871 B |
|
Before Width: | Height: | Size: 972 B After Width: | Height: | Size: 972 B |
|
Before Width: | Height: | Size: 947 B After Width: | Height: | Size: 947 B |
|
Before Width: | Height: | Size: 263 B After Width: | Height: | Size: 263 B |
|
Before Width: | Height: | Size: 267 B After Width: | Height: | Size: 267 B |
|
Before Width: | Height: | Size: 264 B After Width: | Height: | Size: 264 B |
46
index.html
@@ -1,46 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>LDAP to DNS gateway</TITLE>
|
||||
<STYLE TYPE="text/css">
|
||||
H1 {
|
||||
font-weight: bold;
|
||||
font-size: 18pt;
|
||||
line-height: 18pt;
|
||||
font-family: arial,helvetica;
|
||||
font-variant: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
</STYLE>
|
||||
</HEAD>
|
||||
<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
|
||||
<BODY
|
||||
BGCOLOR="#FFFFFF"
|
||||
TEXT="#000000"
|
||||
LINK="#0000FF"
|
||||
VLINK="#000080"
|
||||
ALINK="#FF0000"
|
||||
>
|
||||
<BLOCKQUOTE>
|
||||
<P>
|
||||
<!--#include file="ldap2dns/README.html"-->
|
||||
<P>
|
||||
<H3 align=center>Download</H3>
|
||||
<TABLE border=2 cellpadding=4 align=center>
|
||||
<TR align=center><TH>Version</TH><TH>tar.gz</TH><TH>rpm</TH><TH>srpm</TH><TH>Released</TH></TR>
|
||||
<TR align=center><TD>0.1.1</TD><TD><A HREF="ldap2dns-0.1.1.tar.gz">ldap2dns</A></TD><TD></TD><TD></TD><TD>2000-Sep-19</TD></TR>
|
||||
<TR align=center><TD>0.1.2</TD><TD><A HREF="ldap2dns-0.1.2.tar.gz">ldap2dns</A></TD><TD></TD><TD></TD><TD>2000-Sep-22</TD></TR>
|
||||
<TR align=center><TD>0.1.3</TD><TD><A HREF="ldap2dns-0.1.3.tar.gz">ldap2dns</A></TD><TD></TD><TD></TD><TD>2000-Sep-28</TD></TR>
|
||||
<TR align=center><TD>0.1.4</TD><TD><A HREF="ldap2dns-0.1.4.tar.gz">ldap2dns</A></TD><TD></TD><TD></TD><TD>2000-Oct-04</TD></TR>
|
||||
<TR align=center><TD>0.2.0</TD><TD><A HREF="ldap2dns-0.2.0.tar.gz">ldap2dns</A></TD><TD><A HREF="ldap2dns-0.2.0-1.i386.rpm">ldap2dns</A></TD><TD><A HREF="ldap2dns-0.2.0-1.src.rpm">ldap2dns</A></TD><TD>2000-Dec-14</TD></TR>
|
||||
<TR align=center><TD>0.2.2</TD><TD><A HREF="ldap2dns-0.2.2.tar.gz">ldap2dns</A></TD><TD><A HREF="ldap2dns-0.2.2-2.i386.rpm">ldap2dns</A></TD><TD><A HREF="ldap2dns-0.2.2-2.src.rpm">ldap2dns</A></TD><TD>2001-Feb-16</TD></TR>
|
||||
<TR align=center><TD>0.2.3</TD><TD><A HREF="ldap2dns-0.2.3.tar.gz">ldap2dns</A></TD><TD><A HREF="ldap2dns-0.2.3-1.i386.rpm">ldap2dns</A></TD><TD><A HREF="ldap2dns-0.2.3-1.src.rpm">ldap2dns</A></TD><TD>2001-Mar-23</TD></TR>
|
||||
<TR align=center><TD>0.2.4</TD><TD><A HREF="ldap2dns-0.2.4.tar.gz">ldap2dns</A></TD><TD><A HREF="ldap2dns-0.2.4-1.i386.rpm">ldap2dns</A></TD><TD><A HREF="ldap2dns-0.2.4-1.src.rpm">ldap2dns</A></TD><TD>2001-May-08</TD></TR>
|
||||
<TR align=center><TD>0.2.5</TD><TD><A HREF="ldap2dns-0.2.5.tar.gz">ldap2dns</A></TD><TD><A HREF="ldap2dns-0.2.5-1.i386.rpm">ldap2dns</A></TD><TD><A HREF="ldap2dns-0.2.5-1.src.rpm">ldap2dns</A></TD><TD>2001-Jun-27</TD></TR>
|
||||
<TR align=center><TD>0.2.6</TD><TD><A HREF="ldap2dns-0.2.6.tar.gz">ldap2dns</A></TD><TD><A HREF="ldap2dns-0.2.6-1.i386.rpm">ldap2dns</A></TD><TD><A HREF="ldap2dns-0.2.6-1.src.rpm">ldap2dns</A></TD><TD>2001-Aug-09</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</BLOCKQUOTE>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
BIN
ldap2dns-dbg
@@ -1,134 +0,0 @@
|
||||
--- ldap2dns-0.3.1-orig/ldap2dns.c 2002-08-02 17:19:36.000000000 +0200
|
||||
+++ ldap2dns-0.3.1/ldap2dns.c 2002-09-01 13:31:52.000000000 +0200
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
#define UPDATE_INTERVALL 59
|
||||
-#define LDAP_CONF "/etc/ldap.conf"
|
||||
+#define LDAP_CONF "/etc/ldap/ldap.conf"
|
||||
#define OUTPUT_DATA 1
|
||||
#define OUTPUT_DB 2
|
||||
#define MAXHOSTS 10
|
||||
@@ -85,6 +85,7 @@
|
||||
char searchbase[128];
|
||||
char binddn[128];
|
||||
char hostname[MAXHOSTS][128];
|
||||
+ char urildap[MAXHOSTS][128];
|
||||
int port[MAXHOSTS];
|
||||
char password[128];
|
||||
int usedhosts;
|
||||
@@ -94,6 +95,7 @@
|
||||
int verbose;
|
||||
char ldifname[128];
|
||||
char exec_command[128];
|
||||
+ int use_tls[MAXHOSTS];
|
||||
} options;
|
||||
|
||||
|
||||
@@ -130,7 +132,8 @@
|
||||
static void print_usage(void)
|
||||
{
|
||||
print_version();
|
||||
- printf("usage: ldap2dns[d] [-D binddn] [-b searchbase] [-o data|db] [-h host] [-p port] [-w password] [-L[filename]] [-u numsecs] [-v[v]] [-V]\n\n");
|
||||
+ printf("usage: ldap2dns[d] [-D binddn] [-b searchbase] [-o data|db] [-h host] [-p port] [-H hostURI] "
|
||||
+ "[-w password] [-L[filename]] [-u numsecs] [-v[v]] [-V]\n\n");
|
||||
printf("ldap2dns connects to an LDAP server reads the DNS information stored in objectclasses\n"
|
||||
"\t\tDNSzone and DNSrrset and writes a file to be used by tinydns or named.\n"
|
||||
"\t\tldap2dnsd starts as background-job and continouesly updates DNS information.\n");
|
||||
@@ -143,6 +146,7 @@
|
||||
printf(" -L[filename] Print output in LDIF format for reimport\n");
|
||||
printf(" -h host\tHostname of LDAP server, defaults to localhost\n");
|
||||
printf(" -p port\tPortnumber to connect to LDAP server, defaults to %d\n", LDAP_PORT);
|
||||
+ printf(" -H hostURI\tURI (ldap://hostname or ldaps://hostname of LDAP server\n");
|
||||
printf(" -u numsecs\tUpdate DNS data after numsecs. Defaults to %d if started as daemon.\n\t\t"
|
||||
"Important notice: data.cdb is rewritten only after DNSserial in DNSzone is increased.\n",
|
||||
UPDATE_INTERVALL);
|
||||
@@ -159,7 +163,18 @@
|
||||
|
||||
options.usedhosts = 0;
|
||||
for (i = 0; i<MAXHOSTS; i++) {
|
||||
- if ((k = sscanf(buf, "%128s:%d %512[A-Za-z0-9 .:_+-]", value, &port, rest))>=2) {
|
||||
+ if (!strncasecmp(buf, "ldaps://", 8) || !strncasecmp(buf, "ldap://", 7)) {
|
||||
+ // LDAP-URI is given/found, at the moment only the standard-ports 389 and 636 are supported
|
||||
+ if (!strncasecmp(buf, "ldap://", 7))
|
||||
+ options.use_tls[i] = 1;
|
||||
+ if ((k = sscanf(buf, "%128s %512[A-Za-z0-9 .:/_+-]", value, rest))>=1) {
|
||||
+ strcpy(options.urildap[i], value);
|
||||
+ options.usedhosts++;
|
||||
+ if (k==1)
|
||||
+ break;
|
||||
+ buf = rest;
|
||||
+ } else break;
|
||||
+ } else if ((k = sscanf(buf, "%128s:%d %512[A-Za-z0-9 .:_+-]", value, &port, rest))>=2) {
|
||||
strcpy(options.hostname[i], value);
|
||||
options.port[i] = port;
|
||||
options.usedhosts++;
|
||||
@@ -194,6 +209,8 @@
|
||||
int i;
|
||||
if (sscanf(buf, "BASE %128s", value)==1)
|
||||
strcpy(options.searchbase, value);
|
||||
+ if (sscanf(buf, "URI %512[A-Za-z0-9 .:/_+-]", value)==1)
|
||||
+ parse_hosts(value);
|
||||
if (sscanf(buf, "HOST %512[A-Za-z0-9 .:_+-]", value)==1)
|
||||
parse_hosts(value);
|
||||
if (sscanf(buf, "PORT %d", &len)==1)
|
||||
@@ -239,7 +256,7 @@
|
||||
options.ldifname[0] = '\0';
|
||||
strcpy(options.password, "");
|
||||
strcpy(options.exec_command, "");
|
||||
- while ( (len = getopt(main_argc, main_argv, "b:D:e:h:o:p:u:V:v::w:L::"))>0 ) {
|
||||
+ while ( (len = getopt(main_argc, main_argv, "b:D:e:h:H:o:p:u:V:v::w:L::"))>0 ) {
|
||||
if (optarg && strlen(optarg)>127) {
|
||||
fprintf(stderr, "argument %s too long\n", optarg);
|
||||
continue;
|
||||
@@ -260,6 +277,10 @@
|
||||
strcpy(options.hostname[0], optarg);
|
||||
options.usedhosts = 1;
|
||||
break;
|
||||
+ case 'H':
|
||||
+ strcpy(options.urildap[0], optarg);
|
||||
+ options.usedhosts = 1;
|
||||
+ break;
|
||||
case 'L':
|
||||
if (optarg==NULL)
|
||||
strcpy(options.ldifname, "-");
|
||||
@@ -796,12 +817,37 @@
|
||||
|
||||
static int connect()
|
||||
{
|
||||
- int i;
|
||||
+ int i, rc, version;
|
||||
for (i = 0; i<options.usedhosts; i++) {
|
||||
+ if ( strlen(options.urildap[i]) > 0) {
|
||||
+ rc = ldap_initialize(&ldap_con, options.urildap[i]);
|
||||
+ if (options.verbose&1 && rc == LDAP_SUCCESS) {
|
||||
+ printf("ldap_initialization successful (%s)\n", options.urildap[i]);
|
||||
+ } else if ( rc != LDAP_SUCCESS ) {
|
||||
+ printf("ldap_initialization to %s failed %d\n", options.urildap[i], ldap_err2string(rc));
|
||||
+ ldap_con = NULL;
|
||||
+ return 0;
|
||||
+ }
|
||||
+ version = LDAP_VERSION3;
|
||||
+ if ( (rc=ldap_set_option(ldap_con, LDAP_OPT_PROTOCOL_VERSION, &version)) != LDAP_SUCCESS ) {
|
||||
+ printf("ldap_set_option to %s failed with err %s!\n", options.urildap[i], ldap_err2string(rc));
|
||||
+ ldap_con = NULL;
|
||||
+ return 0;
|
||||
+ }
|
||||
+ if ( options.use_tls[i] && (rc=ldap_start_tls_s( ldap_con, NULL, NULL )) != LDAP_SUCCESS ) {
|
||||
+ printf("ldap_start_tls_s to %s failed with err %s!\n", options.urildap[i], ldap_err2string(rc));
|
||||
+ ldap_con = NULL;
|
||||
+ return 0;
|
||||
+ }
|
||||
+ } else {
|
||||
ldap_con = ldap_init(options.hostname[i], options.port[i]);
|
||||
+ }
|
||||
if (ldap_simple_bind_s(ldap_con, options.binddn, options.password)==LDAP_SUCCESS) {
|
||||
- if (options.verbose&1)
|
||||
+ if (options.verbose&1 && strlen(options.urildap[i]) > 0) {
|
||||
+ printf("Connected to %s as \"%s\"\n", options.urildap[i], options.binddn);
|
||||
+ } else if (options.verbose&1) {
|
||||
printf("Connected to %s:%d as \"%s\"\n", options.hostname[i], options.port[i], options.binddn);
|
||||
+ }
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
diff -bu ldap2dns-0.3.1-p1/dns.schema-2.2 ldap2dns-0.3.1/dns.schema-2.2
|
||||
--- ldap2dns-0.3.1-p1/dns.schema-2.2 2002-08-13 14:23:53.000000000 +0200
|
||||
+++ ldap2dns-0.3.1/dns.schema-2.2 2002-09-02 10:10:32.000000000 +0200
|
||||
@@ -99,12 +99,18 @@
|
||||
SUBSTR caseIgnoreSubstringsMatch
|
||||
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{16} )
|
||||
|
||||
+attributetype ( 1.3.6.1.4.1.7222.1.4.23
|
||||
+ NAME 'dnslocation'
|
||||
+ EQUALITY caseExactIA5Match
|
||||
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{2}
|
||||
+ SINGLE-VALUE )
|
||||
+
|
||||
objectclass ( 1.3.6.1.4.1.7222.1.4.19
|
||||
NAME 'dnszone'
|
||||
MUST ( objectclass $ cn )
|
||||
MAY ( dnszonename $ dnsserial $ dnsrefresh $ dnsretry $ dnsexpire
|
||||
$ dnsminimum $ dnsadminmailbox $ dnszonemaster $ dnstype $ dnsclass
|
||||
- $ dnsttl $ dnstimestamp $ owner $ NIChandle $ TIShandle ) )
|
||||
+ $ dnsttl $ dnstimestamp $ owner $ NIChandle $ TIShandle $ dnslocation ) )
|
||||
|
||||
objectclass ( 1.3.6.1.4.1.7222.1.4.20
|
||||
NAME 'dnsrrset'
|
||||
@@ -113,3 +119,7 @@
|
||||
MAY ( dnsdomainname $ dnsrr $ dnsclass $ dnstype $ dnsipaddr $ dnscipaddr
|
||||
$ dnscname $ dnspreference $ dnsttl $ dnstimestamp $ owner ) )
|
||||
|
||||
+objectclass ( 1.3.6.1.4.1.7222.1.4.24
|
||||
+ NAME 'dnsloccodes'
|
||||
+ MUST ( objectclass $ dnslocation )
|
||||
+ MAY ( dnsipaddr $ uid $ description ) )
|
||||