aboutsummaryrefslogtreecommitdiff
path: root/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'handlers')
-rw-r--r--handlers/Makefile.in489
-rw-r--r--handlers/ldap.helper.in91
-rw-r--r--handlers/ldap.in112
3 files changed, 489 insertions, 203 deletions
diff --git a/handlers/Makefile.in b/handlers/Makefile.in
new file mode 100644
index 0000000..7d92075
--- /dev/null
+++ b/handlers/Makefile.in
@@ -0,0 +1,489 @@
+# Makefile.in generated by automake 1.11.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = handlers
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.in
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(pkgdatadir)"
+DATA = $(pkgdata_DATA)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BASH = @BASH@
+CFGDIR = @CFGDIR@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+HAVE_RPM = @HAVE_RPM@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKTEMP = @MKTEMP@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STAT = @STAT@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_cv_have_rpm = @ac_cv_have_rpm@
+am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+HANDLERS = dup dup.helper maildir makecd \
+ makecd.helper mysql mysql.helper pgsql pgsql.helper rdiff \
+ rdiff.helper rsync sh svn sys sys.helper trac tar tar.helper
+
+DIST_HANDLERS = dup.in dup.helper.in maildir.in makecd.in \
+ makecd.helper.in mysql.in mysql.helper.in pgsql.in pgsql.helper.in rdiff.in \
+ rdiff.helper.in rsync.in sh.in svn.in sys.in sys.helper.in trac.in tar.in tar.helper.in wget
+
+CLEANFILES = $(HANDLERS)
+EXTRA_DIST = Makefile.am $(DIST_HANDLERS)
+edit = sed \
+ -e "s,@BASH\@,$(BASH),g" \
+ -e "s,@AWK\@,$(AWK),g" \
+ -e "s,@SED\@,$(SED),g"
+
+pkgdata_DATA = $(HANDLERS)
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu handlers/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu handlers/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-pkgdataDATA: $(pkgdata_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkgdatadir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \
+ done
+
+uninstall-pkgdataDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir)
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(pkgdatadir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-pkgdataDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-pkgdataDATA
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-pkgdataDATA install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
+ uninstall-am uninstall-pkgdataDATA
+
+
+dup: $(srcdir)/dup.in
+ rm -f dup
+ $(edit) $(srcdir)/dup.in > dup
+
+dup.helper: $(srcdir)/dup.helper.in
+ rm -f dup.helper
+ $(edit) $(srcdir)/dup.helper.in > dup.helper
+
+ldap: $(srcdir)/ldap.in
+ rm -f ldap
+ $(edit) $(srcdir)/ldap.in > ldap
+
+ldap.helper: $(srcdir)/ldap.helper.in
+ rm -f ldap.helper
+ $(edit) $(srcdir)/ldap.helper.in > ldap.helper
+
+maildir: $(srcdir)/maildir.in
+ rm -f maildir
+ $(edit) $(srcdir)/maildir.in > maildir
+
+makecd: $(srcdir)/makecd.in
+ rm -f makecd
+ $(edit) $(srcdir)/makecd.in > makecd
+
+makecd.helper: $(srcdir)/makecd.helper.in
+ rm -f makecd.helper
+ $(edit) $(srcdir)/makecd.helper.in > makecd.helper
+
+mysql: $(srcdir)/mysql.in
+ rm -f mysql
+ $(edit) $(srcdir)/mysql.in > mysql
+
+mysql.helper: $(srcdir)/mysql.helper.in
+ rm -f mysql.helper
+ $(edit) $(srcdir)/mysql.helper.in > mysql.helper
+
+pgsql: $(srcdir)/pgsql.in
+ rm -f pgsql
+ $(edit) $(srcdir)/pgsql.in > pgsql
+
+pgsql.helper: $(srcdir)/pgsql.helper.in
+ rm -f pgsql.helper
+ $(edit) $(srcdir)/pgsql.helper.in > pgsql.helper
+
+rdiff: $(srcdir)/rdiff.in
+ rm -f rdiff
+ $(edit) $(srcdir)/rdiff.in > rdiff
+
+rdiff.helper: $(srcdir)/rdiff.helper.in
+ rm -f rdiff.helper
+ $(edit) $(srcdir)/rdiff.helper.in > rdiff.helper
+
+rsync: $(srcdir)/rsync.in
+ rm -f rsync
+ $(edit) $(srcdir)/rsync.in > rsync
+
+sh: $(srcdir)/sh.in
+ rm -f sh
+ $(edit) $(srcdir)/sh.in > sh
+
+svn: $(srcdir)/svn.in
+ rm -f svn
+ $(edit) $(srcdir)/svn.in > svn
+
+sys: $(srcdir)/sys.in
+ rm -f sys
+ $(edit) $(srcdir)/sys.in > sys
+
+sys.helper: $(srcdir)/sys.helper.in
+ rm -f sys.helper
+ $(edit) $(srcdir)/sys.helper.in > sys.helper
+
+trac: $(srcdir)/trac.in
+ rm -f trac
+ $(edit) $(srcdir)/trac.in > trac
+
+tar: $(srcdir)/tar.in
+ rm -f tar
+ $(edit) $(srcdir)/tar.in > tar
+
+tar.helper: $(srcdir)/tar.helper.in
+ rm -f tar.helper
+ $(edit) $(srcdir)/tar.helper.in > tar.helper
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/handlers/ldap.helper.in b/handlers/ldap.helper.in
deleted file mode 100644
index 4154cc6..0000000
--- a/handlers/ldap.helper.in
+++ /dev/null
@@ -1,91 +0,0 @@
-# -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*-
-# vim: set filetype=sh sw=3 sts=3 expandtab autoindent:
-
-HELPERS="$HELPERS ldap:ldap_database_backup"
-
-ldap_create_file() {
- while true; do
- checkBox "ldap action wizard" "check options (slapcat OR ldapsearch)" \
- "slapcat" "export ldif using slapcat" yes \
- "ldapsearch" "export ldif using ldapsearch" no \
- "compress" "compress the ldif output files" yes \
- "ssl" "use SSL (deprecated)" no \
- "tls" "use TLS extended operations (RFC2246, RFC2830)" yes
- status=$?
- compress="compress = no"
- method="method = <unset>"
- restart="restart = no"
- binddn=""
- passwordfile=""
- ssl="ssl = no"
- tls="tls = no"
- [ $status = 1 ] && return;
- result="$REPLY"
- for opt in $result; do
- case $opt in
- '"compress"') compress="compress = yes";;
- '"slapcat"')
- method="method = slapcat"
- [ "$_RESTART" == "yes" ] && restart="restart = yes"
- ;;
- '"ldapsearch"')
- method="method = ldapsearch"
- inputBox "ldap action wizard" "ldapsearch requires authentication. Specify here what password file to use. It must have the password with no trailing return and it should not be world readable."
- [ $? = 1 ] && return
- passwordfile="passwordfile = $REPLY"
- inputBox "ldap action wizard" "ldapsearch requires authentication. Specify here what DN to bind as:"
- [ $? = 1 ] && return
- binddn="binddn = $REPLY"
- require_packages ldap-utils
- ;;
- '"ssl"') ssl="ssl = yes";;
- '"tls"') tls="tls = yes";;
- esac
- done
- get_next_filename $configdirectory/30.ldap
- cat > $next_filename <<EOF
-$method
-$compress
-$restart
-$binddn
-$passwordfile
-$ssl
-$tls
-# backupdir = /var/backups/ldap
-# conf = /etc/ldap/slapd.conf
-# databases = all
-EOF
- chmod 600 $next_filename
- return
- done
-}
-
-ldap_wizard() {
- bdb=no
- hdb=no
- ldbm=no
- for backend in `grep -e "^backend" /etc/ldap/slapd.conf | @AWK@ '{print $2}'`; do
- if [ "$backend" == "bdb" ]; then
- bdb=yes
- elif [ "$backend" == "hdb" ]; then
- hdb=yes
- elif [ "$backend" == "ldbm" ]; then
- ldbm=yes
- fi
- done
-
- if [ "$bdb" == "yes" -o "$hdb" == "yes" ]; then
- if [ "$ldbm" == "no" ]; then
- msgBox "ldap action wizard" "It looks like the backend in your slapd.conf is set to BDB or HDB. If this is not the case, exit this wizard! From this point on, we will assume BDB or HDB backend, which might have disasterious consequences if this is incorrect."
- _RESTART=no
- ldap_create_file
- fi
- elif [ "$ldbm" == "yes" ]; then
- msgBox "ldap action wizard" "It looks like the backend in your slapd.conf is set to LDBM. Because of this, you will have less options (because it is not safe to use slapcat while slapd is running LDBM)."
- _RESTART=yes
- ldap_create_file
- else
- msgBox "ldap action wizard" "I couldn't find any supported backend in your slapd.conf. Bailing out."
- return
- fi
-}
diff --git a/handlers/ldap.in b/handlers/ldap.in
deleted file mode 100644
index 600f172..0000000
--- a/handlers/ldap.in
+++ /dev/null
@@ -1,112 +0,0 @@
-# -*- mode: sh; sh-basic-offset: 3; indent-tabs-mode: nil; -*-
-# vim: set filetype=sh sw=3 sts=3 expandtab autoindent:
-#
-# openldap backup handler script for backupninja
-#
-
-getconf backupdir /var/backups/ldap
-getconf conf /etc/ldap/slapd.conf
-getconf databases all
-getconf compress yes
-getconf ldif yes
-getconf restart no
-getconf method ldapsearch
-getconf passwordfile
-getconf binddn
-getconf ldaphost
-getconf ssl yes
-getconf tls no
-
-if [ $ssl = 'yes' ]; then
- URLBASE="ldaps"
-else
- URLBASE="ldap"
-fi
-
-status="ok"
-
-[ -f $conf ] || fatal "slapd config file ($conf) not found"
-[ -d $backupdir ] || mkdir -p $backupdir
-[ -d $backupdir ] || fatal "Backup directory '$backupdir'"
-
-dbsuffixes=(`@AWK@ 'BEGIN {OFS=":"} /[:space:]*^database[:space:]*\w*/ {db=$2}; /^[:space:]*suffix[:space:]*\w*/ {if (db=="bdb"||db=="hdb"||db="ldbm") print db,$2}' $conf|@SED@ -e 's/[" ]//g'`)
-
-## LDIF DUMP
-
-if [ "$ldif" == "yes" ]; then
- dumpdir="$backupdir"
- [ -d $dumpdir ] || mkdir -p $dumpdir
-
- if [ "$databases" == 'all' ]; then
- dbcount=`grep '^database' $conf | wc -l`
- let "dbcount = dbcount - 1"
- databases=`seq 0 $dbcount`;
- fi
-
- for db in $databases; do
- if [ `expr index "$db" "="` == "0" ]; then
- # db is a number, get the suffix.
- dbsuffix=${dbsuffixes[$db]/*:/}
- else
- dbsuffix=$db
- fi
- # some databases don't have suffix (like monitor), skip these
- if [ "$dbsuffix" == "" ]; then
- continue;
- fi
-
- if [ "$method" == "slapcat" ]; then
- execstr="$SLAPCAT -f $conf -b $dbsuffix"
- else
- LDAPARGS=""
- if [ "$tls" == "yes" ]; then
- LDAPARGS="-ZZ"
- fi
- if [ -n "$ldaphost" ]; then
- execstr="$LDAPSEARCH $LDAPARGS -H $URLBASE://$ldaphost -x -L -b ""$dbsuffix"" -D ""$binddn"" -y $passwordfile"
- else
- execstr="$LDAPSEARCH -H $URLBASE://$ldaphost -x -L -b ""$dbsuffix"" -D ""$binddn"" -y $passwordfile"
- fi
- [ -f "$passwordfile" ] || fatal "Password file $passwordfile not found. When method is set to ldapsearch, you must also specify a password file."
- debug "$execstr"
- fi
- if [ ! $test ]; then
- if [ "$restart" == "yes" ]; then
- debug "Shutting down ldap server..."
- /etc/init.d/slapd stop
- fi
-
- ext=
- if [ "$compress" == "yes" ]; then
- ext=".gz"
- fi
- touch $dumpdir/$dbsuffix.ldif$ext
- if [ ! -f $dumpdir/$dbsuffix.ldif$ext ]; then
- fatal "Couldn't create ldif dump file: $dumpdir/$dbsuffix.ldif$ext"
- fi
-
- if [ "$compress" == "yes" ]; then
- execstr="$execstr | $GZIP $GZIP_OPTS > $dumpdir/$dbsuffix.ldif.gz"
- else
- execstr="$execstr > $dumpdir/$dbsuffix.ldif"
- fi
- debug "$execstr"
- output=`su root -s /bin/bash -c "set -o pipefail ; $execstr" 2>&1`
- code=$?
- if [ "$code" == "0" ]; then
- debug $output
- info "Successfully finished ldif export of $dbsuffix"
- else
- warning $output
- warning "Failed ldif export of $dbsuffix"
- fi
-
- if [ "$restart" == "yes" ]; then
- debug "Starting ldap server..."
- /etc/init.d/slapd start
- fi
- fi
- done
-fi
-
-return 0