From 07af8260f8866299d3d242dc480bcf7f1e52bd69 Mon Sep 17 00:00:00 2001 From: Mark Reynolds Date: Mar 06 2013 19:45:07 +0000 Subject: Ticket 332 - minor quoting issue in a few scripts. Description: In monitor and ldif2ldap a variable needed to be quoted. https://fedorahosted.org/389/ticket/332 --- diff --git a/ldap/admin/src/scripts/ldif2ldap.in b/ldap/admin/src/scripts/ldif2ldap.in index 4bbc1b5..2ce1cde 100755 --- a/ldap/admin/src/scripts/ldif2ldap.in +++ b/ldap/admin/src/scripts/ldif2ldap.in @@ -99,7 +99,7 @@ protocol=$revised_protocol # if [ "$security" == "on" ]; then if [ "$protocol" == "STARTTLS" ] || [ "$protocol" == "" ]; then - if [ $error == "yes" ]; then + if [ "$error" == "yes" ]; then echo "Using the next most secure protocol(STARTTLS)" fi if [ "$openldap" == "yes" ]; then @@ -116,7 +116,7 @@ fi # if [ "$security" == "on" ]; then if [ "$protocol" == "LDAPS" ] || [ "$protocol" == "" ]; then - if [ $error == "yes" ]; then + if [ "$error" == "yes" ]; then echo "Using the next most secure protocol(LDAPS)" fi if [ "$openldap" == "yes" ]; then @@ -134,12 +134,12 @@ fi if [ "$ldapi" == "on" ] && [ "$openldap" == "yes" ]; then if [ "$protocol" == "LDAPI" ] || [ "$protocol" == "" ]; then if [ "$(id -u)" == "0" ] && [ "$autobind" == "on" ]; then - if [ $error == "yes" ]; then + if [ "$error" == "yes" ]; then echo "Using the next most secure protocol(LDAPI/AUTOBIND)" fi ldapmodify -H $ldapiURL -Y EXTERNAL -a -f $input_file 2>/dev/null else - if [ $error == "yes" ]; then + if [ "$error" == "yes" ]; then echo "Using the next most secure protocol(LDAPI)" fi ldapmodify -x -H $ldapiURL -D $rootdn -w $passwd -a -f $input_file @@ -157,7 +157,7 @@ fi # LDAP # if [ "$protocol" == "LDAP" ] || [ "$protocol" == "" ]; then - if [ $error == "yes" ]; then + if [ "$error" == "yes" ]; then echo "Using the next most secure protocol(LDAP)" fi if [ "$openldap" == "yes" ]; then diff --git a/ldap/admin/src/scripts/monitor.in b/ldap/admin/src/scripts/monitor.in index 93ac140..abe0366 100755 --- a/ldap/admin/src/scripts/monitor.in +++ b/ldap/admin/src/scripts/monitor.in @@ -104,7 +104,7 @@ protocol=$revised_protocol # if [ "$security" == "on" ]; then if [ "$protocol" == "STARTTLS" ] || [ "$protocol" == "" ]; then - if [ $error == "yes" ]; then + if [ "$error" == "yes" ]; then echo "Using the next most secure protocol(STARTTLS)" fi if [ "$openldap" == "yes" ]; then @@ -121,7 +121,7 @@ fi # if [ "$security" == "on" ]; then if [ "$protocol" == "LDAPS" ] || [ "$protocol" == "" ]; then - if [ $error == "yes" ]; then + if [ "$error" == "yes" ]; then echo "Using the next most secure protocol(LDAPS)" fi if [ "$openldap" == "yes" ]; then @@ -139,11 +139,14 @@ fi if [ "$ldapi" == "on" ] && [ "$openldap" == "yes" ]; then if [ "$protocol" == "LDAPI" ] || [ "$protocol" == "" ]; then if [ "$(id -u)" == "0" ] && [ "$autobind" == "on" ]; then - if [ $error == "yes" ]; then + if [ "$error" == "yes" ]; then echo "Using the next most secure protocol(LDAPI/AUTOBIND)" fi ldapsearch -LLL -H "$ldapiURL" -b "$MDN" -s base -Y EXTERNAL "objectClass=*" 2>/dev/null else + if [ "$error" == "yes" ]; then + echo "Using the next most secure protocol(LDAPI)" + fi ldapsearch -x -LLL -H "$ldapiURL" -b "$MDN" -s base $dn $passwd "objectClass=*" fi exit $? @@ -154,7 +157,7 @@ fi # LDAP # if [ "$protocol" == "LDAP" ] || [ "$protocol" == "" ]; then - if [ $error == "yes" ]; then + if [ "$error" == "yes" ]; then echo "Using the next most secure protocol(LDAP)" fi if [ "$openldap" == "yes" ]; then