--- ldapdns-2.06.orig/debian/changelog +++ ldapdns-2.06/debian/changelog @@ -0,0 +1,137 @@ +ldapdns (2.06-3.4) unstable; urgency=low + + * Non-maintainer upload. + * debian/packages: add missing ${shlibs:Depends} management; to make + changes effective, regenerate debian/{control,rules} using yada. + (Closes: #553223) + + -- Stefano Zacchiroli Wed, 02 Dec 2009 12:57:24 +0100 + +ldapdns (2.06-3.3) unstable; urgency=low + + * Non-maintainer upload to solve release goal. + * Add LSB dependency header to init.d scripts (Closes: #464059). + + -- Petter Reinholdtsen Sat, 29 Mar 2008 10:39:14 +0100 + +ldapdns (2.06-3.2) unstable; urgency=low + + * Non-maintainer upload during BSP. + * Fix unconditional use of userdel in postrm (Closes: #431584). + + -- Gregory Colpart (evolix) Sun, 30 Sep 2007 17:14:06 +0200 + +ldapdns (2.06-3.1) unstable; urgency=high + + * Non-maintainer upload. + * Added missing dep on adduser (Closes: #408248) + * Urgency high due RCness + + -- Bastian Venthur Thu, 1 Feb 2007 10:59:00 +0100 + +ldapdns (2.06-3) unstable; urgency=high + + * The upstream didn't fixed Bug#300574, so I've included the patch. + The fix is important because for some caching nameservers the ldapdns's + domains are non-existent if there is no MX record, and then they don't ask + about A record. Finally, you get no mail for these domains. + Closes: #300574. + + -- Piotr Roszatycki Fri, 3 Jun 2005 16:48:59 +0200 + +ldapdns (2.06-2) unstable; urgency=medium + + * Renamed patches files. + * 003-crash_on_malformed_DNS_requests.patch: + - malformed DNS requests get accepted by ldapdns and become malformed LDAP + queries. + + -- Piotr Roszatycki Mon, 25 Apr 2005 12:33:26 +0200 + +ldapdns (2.06-1) unstable; urgency=medium + + * New upstrem release. + * This release fixes some important bug (missed requirements of RFC2308). + Closes: #300574. + * Fixes typo in package description. Closes: #268518, #277240. + + -- Piotr Roszatycki Wed, 13 Apr 2005 15:00:56 +0200 + +ldapdns (2.05-5) unstable; urgency=low + + * Really fixes build script. + + -- Piotr Roszatycki Thu, 5 Aug 2004 19:31:12 +0200 + +ldapdns (2.05-4) unstable; urgency=low + + * Remove Origin field and make lintian happy. + + -- Piotr Roszatycki Thu, 5 Aug 2004 16:08:33 +0200 + +ldapdns (2.05-3) unstable; urgency=low + + * Compiles with gcc-3.4. Closes: #259018. + * Fixes for build script. It can be called debian/rules build after + interrupt. + + -- Piotr Roszatycki Thu, 5 Aug 2004 16:04:21 +0200 + +ldapdns (2.05-2) unstable; urgency=low + + * Fix segfault in some axfr configurations, closes: #213807. + + -- Piotr Roszatycki Thu, 11 Mar 2004 21:15:13 +0100 + +ldapdns (2.05-1) unstable; urgency=medium + + * New upstream release. + * Another problem with init.d script, closes: #208995. + * Does not conflict with bind package. + + -- Piotr Roszatycki Mon, 8 Sep 2003 10:51:28 +0200 + +ldapdns (2.04-3) unstable; urgency=low + + * Build with yada 0.18, closes: #205297. + + -- Piotr Roszatycki Tue, 19 Aug 2003 10:02:08 +0200 + +ldapdns (2.04-2) unstable; urgency=medium + + * Fixes broken postinst script caused by yada. + + -- Piotr Roszatycki Wed, 13 Aug 2003 20:28:19 +0200 + +ldapdns (2.04-1) unstable; urgency=low + + * New upstream release, closes: #200191. + * Export PORT environment variable, closes: #201735. + + -- Piotr Roszatycki Mon, 28 Jul 2003 11:38:26 +0200 + +ldapdns (2.03-1) unstable; urgency=low + + * New upstream release. + + -- Piotr Roszatycki Wed, 12 Mar 2003 13:52:27 +0100 + +ldapdns (2.01-1) unstable; urgency=low + + * New upstream release. + + -- Piotr Roszatycki Fri, 10 Jan 2003 14:55:46 +0100 + +ldapdns (2.00-10-1) unstable; urgency=low + + * New upstream release. + * DEFAULT_* variables for SOA in /etc/ldapdns.conf + + -- Piotr Roszatycki Tue, 10 Dec 2002 13:19:21 +0100 + +ldapdns (2.00-8-1) unstable; urgency=low + + * Initial Debian version, closes: #168969 + + -- Piotr Roszatycki Tue, 22 Oct 2002 11:00:12 +0200 + --- ldapdns-2.06.orig/debian/rules +++ ldapdns-2.06/debian/rules @@ -0,0 +1,277 @@ +#!/usr/bin/make -f +# Generated automatically from debian/packages +# by yada v0.54, of Sun, 28 Oct 2007 + +DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null) +DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null) +DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null) +DEB_HOST_GNU_CPU := $(shell dpkg-architecture -qDEB_HOST_GNU_CPU 2>/dev/null) +DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE 2>/dev/null) +DEB_HOST_GNU_SYSTEM := $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM 2>/dev/null) + +DEB_BUILD_ARCH := $(shell dpkg-architecture -qDEB_BUILD_ARCH 2>/dev/null) +DEB_BUILD_ARCH_OS := $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS 2>/dev/null) +DEB_BUILD_ARCH_CPU := $(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU 2>/dev/null) +DEB_BUILD_GNU_CPU := $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU 2>/dev/null) +DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE 2>/dev/null) +DEB_BUILD_GNU_SYSTEM := $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM 2>/dev/null) + +# Take account of old dpkg-architecture output. +ifeq ($(DEB_HOST_ARCH_CPU),) + DEB_HOST_ARCH_CPU := $(DEB_HOST_GNU_CPU)) + ifeq ($(DEB_HOST_ARCH_CPU),i486) + DEB_HOST_ARCH_OS := i386 + else + ifeq ($(DEB_HOST_ARCH_CPU),x86_64) + DEB_HOST_ARCH_OS := amd64 + endif + endif +endif +ifeq ($(DEB_HOST_ARCH_OS),) + DEB_HOST_ARCH_OS := $(subst -gnu,,$(DEB_HOST_GNU_SYSTEM)) + ifeq ($(DEB_HOST_ARCH_OS),gnu) + DEB_HOST_ARCH_OS := hurd + endif +endif +ifeq ($(DEB_BUILD_ARCH_CPU),) + DEB_BUILD_ARCH_CPU := $(DEB_BUILD_GNU_CPU)) + ifeq ($(DEB_BUILD_ARCH_CPU),i486) + DEB_BUILD_ARCH_OS := i386 + else + ifeq ($(DEB_BUILD_ARCH_CPU),x86_64) + DEB_BUILD_ARCH_OS := amd64 + endif + endif +endif +ifeq ($(DEB_BUILD_ARCH_OS),) + DEB_BUILD_ARCH_OS := $(subst -gnu,,$(DEB_BUILD_GNU_SYSTEM)) + ifeq ($(DEB_BUILD_ARCH_OS),gnu) + DEB_BUILD_ARCH_OS := hurd + endif +endif + +LEFT_PARENTHESIS:=( +VERSION:=$(shell head -n1 debian/changelog | sed -e "s/^[0-9a-zA-Z.-]* $(LEFT_PARENTHESIS)//" -e "s/[^0-9a-zA-Z.:+~-].*//") + +SHELL=/bin/bash + +.PHONY: default +default: + @echo "Specify a target:"; \ + echo " build compile the package"; \ + echo " build-arch compile the architecture-dependent package"; \ + echo " build-indep compile the architecture-independent package"; \ + echo " binary make all binary packages"; \ + echo " binary-arch make all architecture-dependent binary packages"; \ + echo " binary-indep make all architecture-independent binary packages"; \ + echo " clean clean up the source package"; \ + echo; \ + echo " clean-install-tree clean up only under debian/"; \ + echo + +# Build the package and prepare the install tree + +.PHONY: build-only build +build-only: debian/build-stamp +build: build-only + +.PHONY: build-arch-only build-arch +build-arch-only: debian/build-arch-stamp +build-arch: build-arch-only + +.PHONY: build-indep-only build-indep +build-indep-only: debian/build-indep-stamp +build-indep: build-indep-only + +# Make sure these rules and the control file are up-to-date + +.PHONY: rules control templates +rules: debian/rules +debian/rules: $(shell which yada) debian/packages-tmp + yada rebuild rules + +control: debian/control +debian/control: $(shell which yada) debian/packages-tmp + yada rebuild control + +templates: debian/templates debian/po/POTFILES.in +debian/templates: $(shell which yada) debian/packages-tmp + yada rebuild templates +debian/po/POTFILES.in: $(shell which yada) debian/packages-tmp + yada rebuild templates + +debian/build-stamp: debian/build-arch-stamp debian/build-indep-stamp + @[ -f $(shell which yada) -a -f debian/rules ] + @umask 022 \ + && export pwd="$$(pwd)" \ + && export TMPROOT="$$(pwd)/debian/tmp" \ + && export SOURCE="ldapdns" \ + && export VERSION="$(VERSION)" \ + && export DEB_HOST_GNU_CPU="$(DEB_HOST_GNU_CPU)" \ + && export DEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \ + && export DEB_HOST_GNU_SYSTEM="$(DEB_HOST_GNU_SYSTEM)" \ + && export DEB_BUILD_GNU_CPU="$(DEB_BUILD_GNU_CPU)" \ + && export DEB_BUILD_GNU_TYPE="$(DEB_BUILD_GNU_TYPE)" \ + && export DEB_BUILD_GNU_SYSTEM="$(DEB_BUILD_GNU_SYSTEM)" && (\ + echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\ + echo -E 'if [ ! -f stamp-unpack ]; then';\ + echo -E ' (';\ + echo -E ' mkdir -p build-tree';\ + echo -E ' cd build-tree';\ + echo -E ' tar zxvf ../ldapdns-*.tar.gz';\ + echo -E ' ) || false';\ + echo -E ' touch stamp-unpack';\ + echo -E 'fi';\ + echo -E 'if [ ! -f stamp-patch ]; then';\ + echo -E ' (';\ + echo -E ' cd build-tree/*';\ + echo -E ' for p in ../../debian/patches/*.patch; do';\ + echo -E ' patch -p1 < $$p';\ + echo -E ' done';\ + echo -E ' ) || false';\ + echo -E ' touch stamp-patch';\ + echo -E 'fi';\ + echo -E 'CC=$${CC:-gcc}';\ + echo -E 'CFLAGS=$${CFLAGS:--Wall -g}';\ + echo -E 'if [ "$${DEB_BUILD_OPTIONS#*noopt}" != "$$DEB_BUILD_OPTIONS" ]; then';\ + echo -E ' CFLAGS="$$CFLAGS -O0"';\ + echo -E 'else';\ + echo -E ' CFLAGS="$$CFLAGS -O2"';\ + echo -E 'fi';\ + echo -E 'cd build-tree/*';\ + echo -E 'make EXTRA_CFLAGS="$$CFLAGS" EXTRA_LDFLAGS="$$LDFLAGS" CC="$$CC"') | /bin/sh + touch debian/build-stamp + +debian/build-arch-stamp: + @[ -f $(shell which yada) -a -f debian/rules ] + touch debian/build-arch-stamp + +debian/build-indep-stamp: debian/build-arch-stamp + @[ -f $(shell which yada) -a -f debian/rules ] + touch debian/build-indep-stamp + +.PHONY: install-tree +install-tree: install-tree-any +install-tree-any: \ + debian/tmp-ldapdns/DEBIAN/control + +debian/tmp-ldapdns/DEBIAN/control: debian/build-stamp debian/control + rm -rf debian/tmp-ldapdns + umask 022 && install -d debian/tmp-ldapdns/DEBIAN + install -d debian/tmp-ldapdns/usr/share/doc/ldapdns + umask 022; yada generate copyright ldapdns \ + > debian/tmp-ldapdns/usr/share/doc/ldapdns/copyright + install -m 644 -p debian/changelog \ + debian/tmp-ldapdns/usr/share/doc/ldapdns/changelog.Debian + @umask 022 \ + && export pwd="$$(pwd)" \ + && export ROOT="$$(pwd)/debian/tmp-ldapdns" \ + && export TMPROOT="$$(pwd)/debian/tmp" \ + && export CONTROL="$$(pwd)/debian/tmp-ldapdns/DEBIAN" \ + && export PACKAGE="ldapdns" \ + && export SOURCE="ldapdns" \ + && export VERSION="$(VERSION)" \ + && export DEB_HOST_GNU_CPU="$(DEB_HOST_GNU_CPU)" \ + && export DEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \ + && export DEB_HOST_GNU_SYSTEM="$(DEB_HOST_GNU_SYSTEM)" \ + && export DEB_BUILD_GNU_CPU="$(DEB_BUILD_GNU_CPU)" \ + && export DEB_BUILD_GNU_TYPE="$(DEB_BUILD_GNU_TYPE)" \ + && export DEB_BUILD_GNU_SYSTEM="$(DEB_BUILD_GNU_SYSTEM)" && (\ + echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\ + echo -E 'cd build-tree/*';\ + echo -E 'RUN_USER=daemon NO_DAEMONTOOLS=1 NO_TCPSERVERS=1 INITRC=1 bin=sbin \';\ + echo -E ' DESTDIR=$$ROOT prefix=/usr \';\ + echo -E ' ./install.sh';\ + echo -E 'yada remove -dir /etc /var';\ + echo -E 'yada install -conffile $$pwd/debian/conf/ldapdns.conf';\ + echo -E 'yada install -doc -subdir admin admin/*';\ + echo -E 'yada install -doc -subdir examples sample/ldapdns.conf';\ + echo -E 'yada install -doc FAQ AUTHORS README README.* TODO';\ + echo -E 'yada remove -doc README.using';\ + echo -E 'yada install -doc -as changelog CHANGELOG';\ + echo -E 'yada undocumented ldapaxfr.8 ldapdns.8') | /bin/sh + @umask 022 \ + && export pwd="$$(pwd)" \ + && export ROOT="$$(pwd)/debian/tmp-ldapdns" \ + && export TMPROOT="$$(pwd)/debian/tmp" \ + && export CONTROL="$$(pwd)/debian/tmp-ldapdns/DEBIAN" \ + && export PACKAGE="ldapdns" \ + && export SOURCE="ldapdns" \ + && export VERSION="$(VERSION)" && (\ + echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\ + echo -E 'yada perl';\ + echo -E 'yada python';\ + echo -E 'yada strip';\ + echo -E 'yada shlibdeps') | /bin/sh + rm -f debian/shlibs.local || true + test -f debian/tmp-ldapdns/DEBIAN/shlibs && cat debian/tmp-ldapdns/DEBIAN/shlibs | while read lib ver pkg; do echo $$lib $$ver; done >> debian/shlibs.local || true + LD_LIBRARY_PATH="$$LD_LIBRARY_PATH:debian/tmp-ldapdns/lib:debian/tmp-ldapdns/usr/lib" dpkg-shlibdeps -pshlibs:ldapdns -dDepends debian/tmp-ldapdns/usr/sbin/* + yada compress ldapdns + yada generate maintscripts ldapdns + find debian/tmp-ldapdns -type f -print \ + | sed -n 's/^debian\/tmp-ldapdns\(\/etc\/.*\)$$/\1/p' \ + > debian/tmp-ldapdns/DEBIAN/conffiles + test -s debian/tmp-ldapdns/DEBIAN/conffiles || rm -f debian/tmp-ldapdns/DEBIAN/conffiles + yada rebuild control + yada generate substvars ldapdns + umask 022 && dpkg-gencontrol -isp -pldapdns -Pdebian/tmp-ldapdns + +# Build package files + +.PHONY: binary binary-arch binary-indep +binary: binary-arch binary-indep +binary-arch: binary-arch-any + +.PHONY: binary-arch-any +binary-arch-any: \ + binary-package-ldapdns +binary-indep: + +.PHONY: binary-package-ldapdns +binary-package-ldapdns: check-root debian/tmp-ldapdns/DEBIAN/control + @[ -f $(shell which yada) -a -f debian/rules ] + chown -R 0.0 debian/tmp-ldapdns + chmod -R u=rwX,go=rX debian/tmp-ldapdns + @if [ -d debian/tmp-ldapdns/usr/doc/ldapdns ]; then \ + echo "*** Yada warning: /usr/doc/ldapdns should be /usr/share/doc/ldapdns";\ + fi + dpkg-deb --build debian/tmp-ldapdns .. + +.PHONY: check-root +check-root: + @[ `id -u` = 0 ] || (echo "You must be root to do this!"; false) + +debian/packages-tmp: debian/packages + yada rebuild packages + +## Clean up afterwards + +.PHONY: clean clean-install-tree clean-build + +clean: clean-install-tree clean-build debian/control debian/rules + rm -f debian/packages-tmp debian/packages-tmp-new debian/packages-tmp-include + +clean-build: + @[ -f $(shell which yada) -a -f debian/rules ] + rm -f debian/build-stamp debian/build-arch-stamp debian/build-indep-stamp + @umask 022 \ + && export pwd="$$(pwd)" \ + && export TMPROOT="$$(pwd)/debian/tmp" \ + && export SOURCE="ldapdns" \ + && export VERSION="$(VERSION)" \ + && export DEB_HOST_GNU_CPU="$(DEB_HOST_GNU_CPU)" \ + && export DEB_HOST_GNU_TYPE="$(DEB_HOST_GNU_TYPE)" \ + && export DEB_HOST_GNU_SYSTEM="$(DEB_HOST_GNU_SYSTEM)" \ + && export DEB_BUILD_GNU_CPU="$(DEB_BUILD_GNU_CPU)" \ + && export DEB_BUILD_GNU_TYPE="$(DEB_BUILD_GNU_TYPE)" \ + && export DEB_BUILD_GNU_SYSTEM="$(DEB_BUILD_GNU_SYSTEM)" && (\ + echo -E 'eval "yada () { perl $$(which yada) \"\$$@\"; }"; set -e; set -v';\ + echo -E 'rm -rf build-tree';\ + echo -E 'rm -f stamp-*') | /bin/sh + yada unpatch + rm -rf debian/tmp + +clean-install-tree: debian/rules + @[ -f $(shell which yada) -a -f debian/rules ] + rm -f debian/install-tree-stamp + rm -rf debian/tmp-* debian/files* debian/substvars debian/shlibs.local debian/ucf --- ldapdns-2.06.orig/debian/get +++ ldapdns-2.06/debian/get @@ -0,0 +1,54 @@ +#!/bin/sh + +# (c) 2003 Piotr Roszatycki GPL + +# This utility fetch original source + +set -e + +if [ -f changelog ]; then + cd .. +elif [ ! -f debian/changelog ]; then + echo "can't find changelog file" + exit 1 +fi + +srcversion=`head -n 1 debian/changelog | sed -e 's/.*(//' -e 's/-[^-]*).*//'` +srcdir=${SRCNAME}-`echo $srcversion | sed -e 's/.*://'` +srcorig=${SRCNAME}_`echo $srcversion | sed -e 's/.*://'`.orig.tar.gz + +cd .. + +URLLIST="\ +http://www.nimh.org/dl/ldapdns-$srcversion.tar.gz +" + +echo "$URLLIST" | while read url; do + file=${url##*/} + + test -n "$file" || continue + + echo "N: Checking file $file..." + + if [ ! -f /tmp/$file ]; then + ( cd /tmp; wget "$url" ) + fi + + if [ -f /tmp/$file ]; then + ln -s /tmp/$file . + fi + + if [ ! -f $file ]; then + echo "E: Problem with file $file" + echo "E: " + echo "E: Please download $file" + echo "E: $url" + echo "E: and place it in /tmp directory." + exit 1 + fi + +done + +echo "N: Done." + +exit 0 --- ldapdns-2.06.orig/debian/orig +++ ldapdns-2.06/debian/orig @@ -0,0 +1,47 @@ +#!/bin/sh + +# (c) 2003 Piotr Roszatycki , GPL + +# This utility converts original tar.gz archive into Debian source package +# into *.orig.tar.gz + +set -e + +if [ -f changelog ]; then + cd .. +elif [ ! -f debian/changelog ]; then + echo "can't find changelog file" + exit 1 +fi + +SRCNAME=ldapdns + +tmpdir=debsource-$SRCNAME + +srcversion=`head -n 1 debian/changelog | sed -e 's/.*(//' -e 's/-[^-]*).*//'` +srcdir=${SRCNAME}-`echo $srcversion | sed -e 's/.*://'` +srcorig=${SRCNAME}_`echo $srcversion | sed -e 's/.*://'`.orig.tar.gz + +cd .. + +mkdir $tmpdir + +cd $tmpdir + +echo "N: Copying file $f..." + +mkdir $srcdir + +for f in ../ldapdns-$srcversion.tar.gz; do + cp $f $srcdir +done + +echo "N: Creating archive $srcorig..." + +tar zcf ../$srcorig $srcdir + +cd .. + +rm -rf $tmpdir + +echo "N: Done." --- ldapdns-2.06.orig/debian/watch +++ ldapdns-2.06/debian/watch @@ -0,0 +1,5 @@ +# format version number, currently 2; this line is compulsory! +version=2 + +# Automatically generated by cvsdebuscan at Mon, 28 Jul 2003 11:13:35 +0200 +http://www.nimh.org/dl/ldapdns-(.*)\.tar\.gz --- ldapdns-2.06.orig/debian/packages +++ ldapdns-2.06/debian/packages @@ -0,0 +1,171 @@ +# $Id: /trunk/debian/dists/ldapdns/debian/packages 80 2005-04-25T10:35:38.916975Z dexter $ + +# If the debian/rules or debian/control file is missing, rebuild the file: +# +# $ yada rebuild control +# $ yada rebuild rules + + +Source: ldapdns +Section: net +Priority: optional +Maintainer: Piotr Roszatycki +Standards-Version: 3.6.1 +Upstream-Source: +Home-Page: +Description: DNS server that pulls data from an LDAP directory +Copyright: GPL + . +Major-Changes: +%`cd debian/patches; ls *.patch | sed -e 's/^/ /'` +Build-Depends: libldap2-dev +Build: sh + if [ ! -f stamp-unpack ]; then + ( + mkdir -p build-tree + cd build-tree + tar zxvf ../ldapdns-*.tar.gz + ) || false + touch stamp-unpack + fi + if [ ! -f stamp-patch ]; then + ( + cd build-tree/* + for p in ../../debian/patches/*.patch; do + patch -p1 < $p + done + ) || false + touch stamp-patch + fi + CC=${CC:-gcc} + CFLAGS=${CFLAGS:--Wall -g} + if [ "${DEB_BUILD_OPTIONS#*noopt}" != "$DEB_BUILD_OPTIONS" ]; then + CFLAGS="$CFLAGS -O0" + else + CFLAGS="$CFLAGS -O2" + fi + cd build-tree/* + make EXTRA_CFLAGS="$CFLAGS" EXTRA_LDFLAGS="$LDFLAGS" CC="$CC" +Clean: sh + rm -rf build-tree + rm -f stamp-* + +Package: ldapdns +Architecture: any +Recommends: ldap-server +Depends: adduser, [/usr/sbin/*] +Suggests: dnsutils, ldap-utils +Description: DNS server that pulls data from an LDAP directory + LDAPDNS is a ultra-fast, stable, multithreaded DNS server that pulls + data from an LDAP directory. It supports RFC1279 (bind-style), + Microsoft Active Directory, and its own directory layouts. +Install: sh + cd build-tree/* + RUN_USER=daemon NO_DAEMONTOOLS=1 NO_TCPSERVERS=1 INITRC=1 bin=sbin \ + DESTDIR=$ROOT prefix=/usr \ + ./install.sh + yada remove -dir /etc /var + yada install -conffile $pwd/debian/conf/ldapdns.conf + yada install -doc -subdir admin admin/* + yada install -doc -subdir examples sample/ldapdns.conf + yada install -doc FAQ AUTHORS README README.* TODO + yada remove -doc README.using + yada install -doc -as changelog CHANGELOG + yada undocumented ldapaxfr.8 ldapdns.8 +Postinst: sh + if [ "$1" = "configure" ]; then + if ! id -u ldapdns >/dev/null 2>/dev/null; then + adduser --system --group --home /var/lib/ldapdns ldapdns + chown root:root /var/lib/ldapdns + fi + if [ ! -f /var/lib/ldapdns/axfr ]; then + touch /var/lib/ldapdns/axfr + fi + if [ ! -f /var/lib/ldapdns/password ]; then + touch /var/lib/ldapdns/password + chown root:root /var/lib/ldapdns/password + chmod 400 /var/lib/ldapdns/password + fi + fi +Postrm: sh + if [ "$1" = "purge" ]; then + if [ -x "$(command -v userdel)" ]; then + if id -u ldapdns >/dev/null 2>/dev/null; then + userdel ldapdns + fi + else + echo >&2 "not removing ldapdns system account because userdel command was not found" + fi + rm -rf /var/lib/ldapdns || true + rm -f /etc/ldapdns.conf || true + fi +Init: sh + start 15 2 3 4 5 . stop 85 0 1 6 . + ### BEGIN INIT INFO + # Provides: ldapdns + # Required-Start: $remote_fs $syslog + # Required-Stop: $remote_fs $syslog + # Default-Start: 2 3 4 5 + # Default-Stop: 0 1 6 + ### END INIT INFO + . + PATH=/sbin:/bin:/usr/sbin:/usr/bin + . + test -x /usr/sbin/ldapdns || exit 0 + test -f /etc/ldapdns.conf || exit 0 + . + . /etc/ldapdns.conf + . + export \ + ACCELERATE_CACHE ALWAYS_HANGUP ALWAYS_HANGUP_TCP AXFR CACHE \ + DEFAULT_EXPIRE DEFAULT_MINIMUM DEFAULT_REFRESH DEFAULT_RETRY DNSRECORD \ + DNS_THREADS GID HANDLERS HELPER_NOTIFY HOSTMASTER IP \ + I_AM_STUPID_LET_ME_RUN_LDAPDNS_AS_ROOT LDAP_AUTH LDAP_AUTH_NAME \ + LDAP_AXFR LDAP_BINDDN LDAP_HOST LDAP_HOSTS LDAP_SASL LDAP_SUFFIX \ + LDAP_THREADS LOG NETBIOS NO_ADDITIONALS NO_ADDITIONALS_NS NS NSSELF \ + NSUPDATE NS_SELF PORT RELATIVE_NAMES RFC1279 ROOT SCHEDULE_ARECORD \ + SCHEMA SELFNS SELF_NS SUPERVISE TCPREMOTEIP TCPREMOTEPORT THREADS \ + TIMEOUT TIMEOUT_TCP UID + . + case "$1" in + start) + echo -n "Starting domain name service:" + if [ -n "$DNS" ]; then + echo -n " ldapdns" + env UID=$RUN_UID GID=$RUN_GID SUPERVISE=/var/run/ldapdns.pid \ + start-stop-daemon --start --quiet \ + --pidfile /var/run/ldapdns.pid --exec /usr/sbin/ldapdns + fi + if [ -n "$AXFR" ]; then + echo -n " ldapaxfr" + env UID=$RUN_UID GID=$RUN_GID SUPERVISE=/var/run/ldapaxfr.pid \ + start-stop-daemon --start --quiet \ + --pidfile /var/run/ldapaxfr.pid --exec /usr/sbin/ldapaxfr + fi + echo "." + ;; + stop) + echo -n "Stopping domain name service:" + if [ -n "$DNS" ]; then + echo -n " ldapdns" + start-stop-daemon --stop --pidfile /var/run/ldapdns.pid \ + --oknodo --quiet --retry 30 --exec /usr/sbin/ldapdns + rm -f /var/run/ldapdns.pid || true + fi + if [ -n "$AXFR" ]; then + echo -n " ldapaxfr" + start-stop-daemon --stop --pidfile /var/run/ldapaxfr.pid \ + --oknodo --quiet --retry 30 --exec /usr/sbin/ldapaxfr + rm -f /var/run/ldapaxfr.pid || true + fi + echo "." + ;; + restart|force-reload) + $0 stop + sleep 2 + $0 start + ;; + *) + echo "Usage: /etc/init.d/ldapdns {start|stop|restart|force-reload}" >&2 + exit 1 + esac --- ldapdns-2.06.orig/debian/control +++ ldapdns-2.06/debian/control @@ -0,0 +1,16 @@ +Source: ldapdns +Maintainer: Piotr Roszatycki +Section: net +Priority: optional +Standards-Version: 3.6.1 +Build-Depends: libldap2-dev, yada (>= 0.54) + +Package: ldapdns +Architecture: any +Depends: adduser, ${ldapdns:Depends} +Recommends: ldap-server +Suggests: dnsutils, ldap-utils +Description: DNS server that pulls data from an LDAP directory + LDAPDNS is a ultra-fast, stable, multithreaded DNS server that pulls + data from an LDAP directory. It supports RFC1279 (bind-style), + Microsoft Active Directory, and its own directory layouts. --- ldapdns-2.06.orig/debian/conf/ldapdns.conf +++ ldapdns-2.06/debian/conf/ldapdns.conf @@ -0,0 +1,59 @@ +# this is the ldapdns and ldapaxfr configuration file +# + +# UNCOMMENT TO START LDAPDNS +#DNS="." + +# UNCOMMENT TO START LDAPAXFR +# start zone-transfer server for zone +# if it is set to "." then allow transfer for all zones +#AXFR="." + +# listen on this IP address +# if it is set to "0.0.0.0" then it is open to everyone +IP="127.0.0.1" + +# this will be the address put in the SOA +HOSTMASTER="root@localhost" + +# default refresh period put in the SOA +DEFAULT_REFRESH=86400 + +# default retry interval put in the SOA +DEFAULT_RETRY=7200 + +# default expire time put in the SOA +DEFAULT_EXPIRE=604800 + +# default TTL put in the SOA +DEFAULT_MINIMUM=172800 + +# enable syslog support +LOG="syslog" + +# this must be set to whatever the LDAP server is (ips only) +LDAP_HOST="127.0.0.1" + +# this must be set: this is where ldapdns will chroot to +ROOT="/var/lib/ldapdns" + +# if this is set to "sasl" then OpenLDAP's SASL engine will be used +# if it is set to "simple" you must also fill in /var/lib/ldapdns/password +LDAP_AUTH="anonymous" + +# this is whatever to authenticate as +LDAP_AUTH_NAME="" + +# this is your LDAP suffix +LDAP_SUFFIX="" + +# the schema of LDAP database and queries (rfc1279, msdns, cosine, ldapdns) +SCHEMA=cosine + +# these tune performance +HANDLERS="128" +THREADS="16" + +# run with this user and group +RUN_UID="$(id -u ldapdns)" +RUN_GID="$(id -g ldapdns)" --- ldapdns-2.06.orig/debian/patches/003-crash_on_malformed_DNS_requests.patch +++ ldapdns-2.06/debian/patches/003-crash_on_malformed_DNS_requests.patch @@ -0,0 +1,66 @@ +Dear ldapdns author, +(CC to Debian Maintainer and to ldapdns 3 development mailing list) + +I have encountered a few problems while trying to set up and use ldapdns +2.05, not the least of them having to do with the messy and incomplete +documentation! Nonetheless I thank you much for your work, because I +think yours is all-around the best ldap-to-dns solution available today. + +I managed to solve one of the (non-documentation related) problems I +found. Here is an explanation and a patch, which the Debian maintainer +and the ldapdns 3 development team might be interested in discussing or +applying on their own. I'm still working on other problems and I will +notify you if/when I come to any valuable conclusion or piece of code. + + +Description: malformed DNS requests get accepted by ldapdns and become +malformed LDAP queries. The ldap server answers with an appropriate but +uncommon error, which makes ldapdns panic and restart itself. + +Steps to reproduce: host " 'z') ++ && (str(sa)[r] < '0' || str(sa)[r] > '9') ++ && str(sa)[r] != '-' && str(sa)[r] != '.') { ++ /* invalid query: return an error BEFORE asking ldap */ ++ complete_phase(c, '/'); ++ return; ++ } ++ } + if (ldapdns.dn_mode == DN_MODE_LDAPDNS) { + str_init(sb); + str_copy(sb, "(|(associatedDomain="); + --- ldapdns-2.06.orig/debian/patches/004-fix_rfc2308.patch +++ ldapdns-2.06/debian/patches/004-fix_rfc2308.patch @@ -0,0 +1,47 @@ +--- ldapdns-2.06.orig/engine.c 2005-05-09 19:54:35.000000000 +0200 ++++ ldapdns-2.06/engine.c 2005-05-09 19:56:15.000000000 +0200 +@@ -2168,7 +2168,7 @@ + || !response_addulong(c, c->minimum)) { + fatal("could not construct SOA"); + } +- response_rfinish(c, RESPONSE_ANSWER); ++ response_rfinish(c, RESPONSE_AUTHORITY); + } + + /* also included SOA */ +@@ -2269,7 +2269,7 @@ + || !response_addulong(c, c->minimum)) { + fatal("could not construct SOA"); + } +- response_rfinish(c, RESPONSE_ANSWER); ++ response_rfinish(c, RESPONSE_AUTHORITY); + } + + /* also included SOA */ +@@ -2337,7 +2337,7 @@ + || !response_addulong(c, c->minimum)) { + fatal("could not construct SOA"); + } +- response_rfinish(c, RESPONSE_ANSWER); ++ response_rfinish(c, RESPONSE_AUTHORITY); + } + + /* also included SOA */ +@@ -2376,7 +2376,7 @@ + || !response_addulong(c, c->minimum)) { + fatal("could not construct SOA"); + } +- response_rfinish(c, RESPONSE_ANSWER); ++ response_rfinish(c, RESPONSE_AUTHORITY); + } + + /* also included SOA */ +@@ -2434,7 +2434,7 @@ + || !response_addulong(c, c->minimum)) { + fatal("could not construct SOA"); + } +- response_rfinish(c, RESPONSE_ANSWER); ++ response_rfinish(c, RESPONSE_AUTHORITY); + } + while ((dat = list_pop(&c->NS))) { + if (!response_rstart(c, c->request_name_zone, DNS_T_NS, c->ttl) --- ldapdns-2.06.orig/debian/patches/001-fix_axfr_segfault.patch +++ ldapdns-2.06/debian/patches/001-fix_axfr_segfault.patch @@ -0,0 +1,21 @@ +diff -urN ldapdns-2.05.orig/engine.c ldapdns-2.05/engine.c +--- ldapdns-2.05.orig/engine.c 2003-08-31 20:23:44.000000000 -0700 ++++ ldapdns-2.05/engine.c 2003-10-02 12:26:29.000000000 -0700 +@@ -2504,7 +2504,7 @@ + + finish_axfr_l: + if (!response_axstart(c, 1, c->request_name, DNS_T_SOA, DNS_C_IN, c->ttl) +- || !response_addname(c, ldapdns.self_ns ? ldapdns.self_ns : c->ns->str) ++ || !response_addname(c, ldapdns.self_ns ? ldapdns.self_ns : (c->ns ? c->ns->str : "")) + || !response_addname(c, c->ADM ? c->ADM->str : ldapdns.hostmaster) + || !response_addulong(c, c->serial) + || !response_addulong(c, c->refresh) +@@ -2596,7 +2596,7 @@ + /* SOA comes first... + */ + if (!response_axstart(c, 1, c->request_name, DNS_T_SOA, DNS_C_IN, c->ttl) +- || !response_addname(c, ldapdns.self_ns ? ldapdns.self_ns : c->ns->str) ++ || !response_addname(c, ldapdns.self_ns ? ldapdns.self_ns : (c->ns ? c->ns->str : "")) + || !response_addname(c, c->ADM ? c->ADM->str : ldapdns.hostmaster) + || !response_addulong(c, c->serial) + || !response_addulong(c, c->refresh) --- ldapdns-2.06.orig/debian/patches/002-fix_for_gcc-3.4.patch +++ ldapdns-2.06/debian/patches/002-fix_for_gcc-3.4.patch @@ -0,0 +1,10 @@ +--- ldapdns-2.05.orig/ldapdns.c 2003-06-23 20:56:44.000000000 +0200 ++++ ldapdns-2.05.orig/ldapdns.c 2004-08-05 15:53:41.000000000 +0200 +@@ -21,6 +21,7 @@ + list_push(&x, lp->str); + list_push(&seen, lp->str); + HIT: ++ continue; + } + + lp = *p;