. Removed warning about vserver not running (thanks anarcat)
ldap:
. Compress now happens in-line to save some disk space (Closes: #370778)
+ . ldaphost and tls options added for ldapsearch method (Closes: #362027)
makecd:
. Added nicelevel option (thanks rhatto)
lib changes
## to, not needed for slapcat
# binddn =
+## ldaphost (no default): set this to your ldap host if it is not local
+# ldaphost =
+
+## tls (default yes): if set to 'yes' then TLS connection will be
+## attempted to your ldaphost by using the URI base ldaps: otherwise ldap: will be used
+# tls = yes
\ No newline at end of file
getconf method ldapsearch
getconf passwordfile
getconf binddn
+getconf ldaphost
+getconf tls yes
+
+if [ $tls = 'yes' ]
+ URLBASE="ldaps"
+else
+ URLBASE="ldap"
+fi
status="ok"
debug "$execstr"
else
if [ "$compress" == "yes" ]; then
- execstr="$LDAPSEARCH -x -L -b ""$dbsuffix"" -D ""$binddn"" -y $passwordfile | $GZIP"
+ if [ -n "$ldaphost" ]
+ execstr="$LDAPSEARCH -H $URLBASE://$ldaphost -x -L -b ""$dbsuffix"" -D ""$binddn"" -y $passwordfile | $GZIP"
+ else
+ execstr="$LDAPSEARCH -x -L -b ""$dbsuffix"" -D ""$binddn"" -y $passwordfile | $GZIP"
+ fi
else
- execstr="$LDAPSEARCH -x -L -b ""$dbsuffix"" -D ""$binddn"" -y $passwordfile"
+ if [ -n "$ldaphost" ]
+ execstr="$LDAPSEARCH -H $URLBASE://$ldaphost -x -L -b ""$dbsuffix"" -D ""$binddn"" -y $passwordfile"
+ else
+ execstr="$LDAPSEARCH -x -L -b ""$dbsuffix"" -D ""$binddn"" -y $passwordfile"
+ fi
fi
[ -f "$passwordfile" ] || fatal "Password file $passwordfile not found. When method is set to ldapsearch, you must also specify a password file."
debug "$execstr"