diff --git a/CHANGELOG b/CHANGELOG index 7c4ad86..a811ec1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,10 +1,14 @@ -Version 0.2.6 (next) +Version 0.2.7 (next) + Make ldap2dns behave like a secondary nameserver by storing the serial number, expire, refresh, retry and minimum values in a record. -+ Password to connect to LDAP now is invisible to ps. -Version 0.2.5 (latest) +Version 0.2.6 (latest) ++ Password passed with option -w now is invisible to 'ps'. ++ ldap2tinydns-conf now takes a parameter to specify to user under + which ldap2dns will be running. + +Version 0.2.5 - Tested with OpenLDAP-2.0. - Adopted dns.schema with official numbers. diff --git a/Makefile b/Makefile index 071e176..459624b 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -# $Id: Makefile,v 1.26 2001/06/27 15:16:10 jrief Exp $ -VERSION=0.2.5 +# $Id: Makefile,v 1.27 2001/08/09 10:35:49 jrief Exp $ +VERSION=0.2.6 RELEASE=1 CC=gcc -O2 CFLAGS=$(INC) -DVERSION='"$(VERSION)"' diff --git a/dns.schema b/dns.schema index 1cae496..81044c4 100644 --- a/dns.schema +++ b/dns.schema @@ -1,6 +1,6 @@ # schema for DNS data # include this file into Your slapd.conf for openldap-2.0.x -# $Id: dns.schema,v 1.7 2001/06/28 07:41:12 jrief Exp $ +# $Id: dns.schema,v 1.8 2001/08/09 10:35:49 jrief Exp $ attributetype ( 1.3.6.1.4.1.7222.1.4.1 NAME 'DNSzonename' @@ -55,13 +55,13 @@ attributetype ( 1.3.6.1.4.1.7222.1.4.12 NAME 'DNSipaddr' EQUALITY numericStringMatch SUBSTR numericStringSubstringsMatch - SYNTAX 1.3.6.1.4.1.1466.115.121.1.36 ) + SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{16} ) attributetype ( 1.3.6.1.4.1.7222.1.4.13 NAME 'DNScipaddr' EQUALITY numericStringMatch SUBSTR numericStringSubstringsMatch - SYNTAX 1.3.6.1.4.1.1466.115.121.1.36 ) + 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' diff --git a/index.html b/index.html index bb35030..b930020 100644 --- a/index.html +++ b/index.html @@ -37,6 +37,7 @@ 0.2.3ldap2dnsldap2dnsldap2dns2001-Mar-23 0.2.4ldap2dnsldap2dnsldap2dns2001-May-08 0.2.5ldap2dnsldap2dnsldap2dns2001-Jun-27 +0.2.6ldap2dnsldap2dnsldap2dns2001-Aug-09 diff --git a/ldap2dns.c b/ldap2dns.c index 0cf58dc..a54dc3d 100644 --- a/ldap2dns.c +++ b/ldap2dns.c @@ -1,6 +1,6 @@ /* * Create data from an LDAP directory service to be used for tinydns - * $Id: ldap2dns.c,v 1.29 2001/06/27 15:16:10 jrief Exp $ + * $Id: ldap2dns.c,v 1.30 2001/08/09 10:35:49 jrief Exp $ * Copyright 2000 by Jacob Rief * License: GPL version 2 or later. See http://www.fsf.org for details */ @@ -14,7 +14,7 @@ #include #define UPDATE_INTERVALL 59 -#define LDAP_CONF "/etc/openldap/ldap.conf" +#define LDAP_CONF "/etc/ldap.conf" #define OUTPUT_DATA 1 #define OUTPUT_DB 2 #define MAXHOSTS 10 @@ -183,7 +183,7 @@ static int parse_options() extern int optind, opterr, optopt; char buf[256], value[128]; int len; - FILE* ldap_conf; + FILE* ldap_conf,*fp; char* ev; strcpy(options.searchbase, ""); @@ -199,6 +199,11 @@ static int parse_options() if (sscanf(buf, "PORT %d", &len)==1) for (i = 0; i0) + if (ev && sscanf(ev, "%d", &len)==1 && len>0) { options.update_iv = len; + } options.output = 0; ev = getenv("LDAP2DNS_OUTPUT"); if (ev) { @@ -222,11 +228,18 @@ static int parse_options() else if (strcmp(ev, "db")==0) options.output = OUTPUT_DB; } + ev = getenv("LDAP2DNS_BINDDN"); + if (ev) { + strncpy(options.binddn, ev, 128); + ev = getenv("LDAP2DNS_PASSWORD"); + if (ev) + strncpy(options.password, ev, 128); + } options.verbose = 0; 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:Vw:v::L::"))>0 ) { + while ( (len = getopt(main_argc, main_argv, "b:D:e:h:o:p:u:V:v::w:L::"))>0 ) { if (optarg && strlen(optarg)>127) { fprintf(stderr, "argument %s too long\n", optarg); continue; @@ -274,6 +287,7 @@ static int parse_options() exit(0); case 'w': strcpy(options.password, optarg); + memset(optarg, 'x', strlen(options.password)); break; case 'e': strcpy(options.exec_command, optarg);