ajout d'un commentaire sur l'échappement des caractères dans les filtres LDAP

This commit is contained in:
Benjamin Dauvergne 2018-04-27 16:55:22 +02:00
parent b7fb793fb0
commit af2c7c7e96
1 changed files with 4 additions and 0 deletions

View File

@ -112,6 +112,10 @@ EOF
fi
# remove the displayname constraint
# NOTE: left parenthesis must be escaped with \28
# right parenthesis with \29
# stars with \2a
# backslash with \5c
if ldapsearch -H ldapi:// -Y EXTERNAL -b "$DN2" "olcConstraintAttribute=displayName,sn,givenName set \"\\28this/givenName + [ ] + this/sn\\29 & this/displayName\" restrict=\"ldap:///ou=people,$SUFFIX??sub?\\28objectClass=\\2a\\29\"" 2>/dev/null | grep -q ^olcConstraintAttribute ; then
cat <<EOF >$LDIF
dn: $DN2