X-Git-Url: https://git.stderr.nl/gitweb?p=matthijs%2Fupstream%2Fbackupninja.git;a=blobdiff_plain;f=handlers%2Fldap.helper.in;h=92518265b62b1eddf3fdc229a494c74d23944d83;hp=5ccbe7e860726e3ab822270d24b3cb332ab828ef;hb=0a6abfc3cef116a69c7a4c8a820a08406432b46f;hpb=c2f0b78ad6725fb1194ab1e58e4625c0c1989b57 diff --git a/handlers/ldap.helper.in b/handlers/ldap.helper.in index 5ccbe7e..9251826 100644 --- a/handlers/ldap.helper.in +++ b/handlers/ldap.helper.in @@ -7,13 +7,17 @@ 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 + "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 = " restart="restart = no" binddn="" passwordfile="" + ssl="ssl = no" + tls="tls = no" [ $status = 1 ] && return; result="$REPLY" for opt in $result; do @@ -33,6 +37,8 @@ while true; do binddn="binddn = $REPLY" require_packages ldap-utils ;; + '"ssl"') ssl="ssl = yes";; + '"tls"') tls="tls = yes";; esac done get_next_filename $configdirectory/30.ldap @@ -42,6 +48,8 @@ $compress $restart $binddn $passwordfile +$ssl +$tls # backupdir = /var/backups/ldap # conf = /etc/ldap/slapd.conf # databases = all @@ -53,26 +61,30 @@ 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" -a "$bdb" == "no" ]; then + if [ "$backend" == "bdb" ]; then bdb=yes - elif [ "$backend" == "ldbm" -a "$ldbm" == "no" ]; then + elif [ "$backend" == "hdb" ]; then + hdb=yes + elif [ "$backend" == "ldbm" ]; then ldbm=yes fi done - if [ "$bdb" == "yes" -a "$ldbm" == "no" ]; then - msgBox "ldap action wizard" "It looks like the backend in your slapd.conf is set to BDB. If this is not the case, exit this wizard! From this point on, we will assume BDB backend, which might have disasterious consequences if this is incorrect." - _RESTART=no - ldap_create_file + 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 backends in your slapd.conf. Bailing out." + msgBox "ldap action wizard" "I couldn't find any supported backend in your slapd.conf. Bailing out." return fi } -