From 8ffab03cef996a36838f9cb2e90a2df5ff692ec1 Mon Sep 17 00:00:00 2001 From: Ben Klang Date: Wed, 15 Mar 2006 20:08:59 +0000 Subject: [PATCH] Polishing 0.3.7 release. New focus is ldap2dns 1.0. git-svn-id: https://svn.alkaloid.net/gpl/ldap2dns/trunk@296 06cd67b6-e706-0410-b29e-9de616bca6e9 --- ChangeLog | 1 + TODO | 6 +----- doc/example.ldif | 2 +- ldap2dns.c | 18 +++++++++++++----- 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8f7ce3e..4f1c185 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ Version 0.3.7 (latest) + Updated doc/README.html + Added security audit result patch from Erik Cabetas (erik.cabetas.com) + Fixed typo in ldap2dns.spec.in ++ Updated example ldif in doc/ (Thanks Marc Huot) Version 0.3.6 + New maintainer: Ben Klang diff --git a/TODO b/TODO index 948f886..8ee45cc 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,4 @@ # $Id$ -* Add startup and shutdown messages for daemon mode. (2005/12/22 bklang) - * Add support for configuring basedn, binddn, bindpw, and execute command via environment variables. (2005/12/07 bklang) @@ -16,13 +14,11 @@ * Modify scripts/data2ldap.pl to merge multiple A records for a single host in data file into single object in LDAP (2005/12/08 bklang) ---- For ldap2dns 0.4 --- WILL BREAK COMPATIBILITY --- +--- For ldap2dns 1.0 --- WILL BREAK COMPATIBILITY --- * Clean up DNS TXT support: text current requires a trailing '.', probably should introduce a new attribute for DNS TXT so it is unambiguous (2005/12/23 bklang) -* Remove dnszonename and use dnsdomainname instead (2006/01/16 bklang) - --- Old TODOs from Jacob --- Version ?.?.? (next) + Make ldap2dns behave like a secondary nameserver by storing diff --git a/doc/example.ldif b/doc/example.ldif index 1ec6071..0c8c875 100644 --- a/doc/example.ldif +++ b/doc/example.ldif @@ -147,7 +147,7 @@ dnstype: a objectClass: top objectClass: dnszone objectClass: dnsrrset -dnsdomainname: braque.example.com. +dnsdomainname: baz.example.com. cn: APTR-baz.example.com dnscipaddr: 192.168.0.15 diff --git a/ldap2dns.c b/ldap2dns.c index 7635d96..8e259bd 100644 --- a/ldap2dns.c +++ b/ldap2dns.c @@ -13,8 +13,9 @@ #include #include #include +#include -#define UPDATE_INTERVALL 59 +#define UPDATE_INTERVAL 59 #define LDAP_CONF "/etc/ldap.conf" #define OUTPUT_DATA 1 #define OUTPUT_DB 2 @@ -163,7 +164,7 @@ static void print_usage(void) 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); + UPDATE_INTERVAL); printf(" -e \"exec-cmd\" This command is executed after ldap2dns regenerated its data files\n"); printf(" -v\t\trun in verbose mode\n"); printf(" -vv\t\teven more verbose\n"); @@ -249,7 +250,7 @@ static int parse_options() len = strlen(main_argv[0]); if (strcmp(main_argv[0]+len-9, "ldap2dnsd")==0) { options.is_daemon = 1; - options.update_iv = UPDATE_INTERVALL; + options.update_iv = UPDATE_INTERVAL; } else { options.is_daemon = 0; options.update_iv = 0; @@ -292,7 +293,7 @@ static int parse_options() break; case 'u': if (sscanf(optarg, "%d", &options.update_iv)!=1) - options.update_iv = UPDATE_INTERVALL; + options.update_iv = UPDATE_INTERVAL; if (options.update_iv<=0) options.update_iv = 1; break; case 'D': @@ -1028,9 +1029,16 @@ int main(int argc, char** argv) main_argc = argc; main_argv = argv; parse_options(); + + fprintf(stdout, "ldap2dns v%s starting up", VERSION); + + /* Initialization complete. If we're in daemon mode, fork and continue */ if (options.is_daemon) { - if (options.is_daemon==1 && fork()) + if (options.is_daemon==1 && fork()) { + if (options.verbose) + fprintf(stdout, "Sending process to background."); exit(0); + } /* lowest priority */ nice(19); }